import { type ListFrontEndInterface } from '../../CommonType'

export interface ProtfolioStateInterface {
    categoryDropDownList: ListFrontEndInterface[]
    portfolioList: PortfolioManagerDetail[]
    portfolioListCount: number
}

export interface ProtfolioTableDataInterface extends PortfolioManagerDetail {
    key: React.Key
}
export interface PortfolioManagerDetail {
    manager: string
    portfolioId: number
    number: string
    name: string
    managerId: number
    remarks: string
    clientCategoryId: number
}
export interface ProtfolioFormDataInterface {
    portfolioId: number
    number: string
    name: string
    managerId: number
    remarks: string
    clientCategoryId: number
}

export interface PortfolioFormStateInterface {
    categoryDropDownList: ListFrontEndInterface[]
    userList: ListFrontEndInterface[]
}
export interface PortfolioDetailsFormInterface
    extends PortfolioFormStateInterface {
    onSave: (
        data: ProtfolioFormDataInterface,
        callBack: CallableFunction
    ) => void
    editData: ProtfolioFormDataInterface
}

export interface PortfolioPartnersPayloadInterface {
    data: PortfolioManagerDetail[]
    noOfRecords: number
}

export interface PortfolioClinetAddPage {
    portfolioId: number
    clientCategoryId: number
}

export interface ClientCompanyDetails {
    portfolioId: number
    clientNumber: string
    name: string
    businessType: string
    businessTypeId: number
    referenceId: number
}

export interface PortfolioClientviewData {
    portfolioId: number
    number: string
    name: string
    managerId: number
    accountsManagerId: number
    kmpReferenceType: number
    kmpReferenceId: number
    clientCompanyDetailsList: ClientCompanyDetails[]
    manager: string
    accountsManager: string
    kmpReferenceTypeLabel: string
    kmpReferenceLabel: string
    remarks: string
    clientCategoryId: number
}

export interface PortfolioClientviewTableData extends ClientCompanyDetails {
    key: React.Key
}

export interface PortfolioClientAddData {
    portfolioId: number
    businessTypeId: number
    referenceId: number
    addOrRemoveFlag: number
}

export interface PortfolioClientDataTableData extends PortfolioClientData {
    key: React.Key
}

export interface PortfolioClientData {
    businessTypeId: number
    referenceId: number
    clientNumber: string
    businessType: string
    businessName: string
}

export interface PortfoliounAssigneePayloadInterface {
    data: PortfolioClientData[]
    noOfRecords: number
}

export interface UnassignUserListStateInterface {
    portfolioUnassignUserList: PortfolioClientDataTableData[]
    portfolioUnassignUserListCount: number
}

export interface UnassignUserListInterface
    extends UnassignUserListStateInterface {
    clientCategoryId: number
    portfolioId: number
    fetchclientData: () => void
}

export interface AccountMangerFormData {
    portfolioId: number
    businessTypeId: number
    referenceId: number
    accountsManagerId: number
}

export interface AccountMangerState {
    userList: ListFrontEndInterface[]
}
export interface AccountMangerFormInterface extends AccountMangerState {
    onSave: (data: AccountMangerFormData, callBack: CallableFunction) => void
    portfolioId: number
    businessTypeId: number
    referenceId: number
}

export interface SaveRemarkData {
    portfolioId: number
    remarks: string
    businessTypeId: number
    referenceId: number
}

export interface ClientPortfolioCompanyRemarksView {
    portfolioRemarksId: number
    remarks: string
    createdDate: string // Consider using Date type if working with date objects.
    createdName: string
}

export interface PortfolioRemarksList {
    portfolioId: number
    number: string
    name: string
    remarks: string
    managerId: number
    clientCategoryId: number
    manager: string
    clientPortfolioCompanyRemarksView: ClientPortfolioCompanyRemarksView[]
}

export interface PortfolioRemarksListTable
    extends ClientPortfolioCompanyRemarksView {
    key: React.Key
}

export interface PortfolioRemarksListPayload {
    data: PortfolioRemarksList
}

export interface PortfolioRemarksListStateInterface {
    portfolioRemarksListData: PortfolioRemarksList
}

export interface PortfolioRemarksListPropsInterface {
    portfolioRemarksListData: PortfolioRemarksList
    portfolioId: number
    businessId: number
    referenceId: number
}
