import type { User } from 'aws-sdk/clients/appstream'
import type { ListFrontEndInterface } from '../../CommonType'

export interface SoleTraderListDataTypeInterface
    extends SoleTraderFormDataInterface {
    key: React.Key
}

export interface SoleTraderListStateInterface {
    soleTraderList: SoleTraderListDataTypeInterface[]
    soleTraderListCount: number
    serviceId: number
}

export interface SoleTraderListInterface {
    soleTraderList: SoleTraderListDataTypeInterface[]
    soleTraderListCount: number
    selectedCategoryId: number
    selectedServiceId: number
}

export interface Category {
    id: number
    name: string
}

export interface SoleTraderFormDataInterface {
    soleTraderId: string
    clientCategoryId: number
    natureOfBusiness: string
    businessTradingName: string
    clientNumber: string
    activestatus: string
    serviceIds: string
    contactName: string
    mobilenumber: string
    emailAddress: string
    AlternativeEmailAddress: string
    DefaultUser: string
    DefaultAssigneeUser: string
}

export interface SoleTraderChatInterface {
    soleTraderid: string
    ReferenceId: number
    Description: string
    userIds: number[]
    BusinessTypeId: number
    IsClientCommunication: number
}

export interface CorporateFormInterface {
    clientDropDownList: ListFrontEndInterface[]
}

export interface SoleTraderPayloadInterface {
    data: SoleTraderFormDataInterface[]
    noOfRecords: number
}

export interface SoleTraderExpandViewInterface {
    soleTraderData: SoleTraderListDataTypeInterface
}

export interface SoleTraderChatPropsInterface {
    userList: User[]
    soleTraderId: number
}

export interface FormValues {
    index: number
    buttonName: string
}

export interface SoleTraderChatStateInterface {
    userList: Array<{ label: string }>
}

export interface SoleTraderChatProps extends SoleTraderChatStateInterface {
    soleTraderId: number
}

export interface SoleTraderViewProps extends SoleTraderChatPropsInterface {}

export interface SoleTraderData {
    businessTradingName: string
    contactName: string
    clientnumber: string
    clientType: string
}

export interface SoleTraderCreateFormDataInterface {
    soleTraderId: 0
    clientNumber: string
    title: string
    firstName: string
    middleName: string
    surName: string
    dateOfBirth: string
    natureOfBusiness: string
    businessTradingName: string
    homeAddressOne: string
    homeAddressTwo: string
    homeTown: string
    homeCountry: string
    homePostCode: string
    mobileNumber: string
    homeNumber: string
    workNumber: string
    emailAddress: string
    alternativeEmailAddress: string
    niNumber: string
    nationality: string
    busAddress1: string
    busAddress2: string
    busTown: string
    busCountry: string
    busPostCode: string
    corrAddress1: string
    corrAddress2: string
    corrTown: string
    corrCountry: string
    corrPostCode: string
    clientCategoryId: 0
    individualUTR: string
    isActive: string
    isDelete: string
}
export interface SoleTraderInitialDetails {
    soleTraderId: number
    clientNumber: string
    title: string
    firstName: string
    middleName: string
    surName: string
    natureOfBusiness: string
    businessTradingName: string
    clientCategoryId: number
    individualUTR: string
    clientCategoryName: string
    dateOfTermSigned: string // Consider using Date type if dates need to be processed
}

export interface SoleTraderPersonalDetails {
    dateOfBirth: string // Consider using Date type if dates need to be processed
    niNumber: string
    nationality: string
    mobileNumber: string
    homeNumber: string
    workNumber: string
    emailAddress: string
    alternativeEmailAddress: string
}

export interface Address {
    corraddress1: string
    corraddress2: string
    corrtown: string
    corrcountry: string
    corrpostcode: string
}
export interface RegisterAddressData {
    regaddress1: string
    regaddress2: string
    regtown: string
    regcountry: string
    regpostcode: string
}
interface BusinessAddress {
    busaddress1: string
    busaddress2: string
    bustown: string
    buscountry: string
    buspostcode: string
}
export interface SoleTraderHomeData {
    soleTraderInitialDetails: SoleTraderInitialDetails
    soleTraderPersonalDetails: SoleTraderPersonalDetails
    registerOfficeAddress: RegisterAddressData
    businessAddress: BusinessAddress
    correspondanceAddress: Address
}
export interface HomeStateProps {
    categoryDropDownList: ListFrontEndInterface[]
    countryList: ListFrontEndInterface[]
    soleTraderTaps: SoleTraderHomeData
}

export interface BussinessStateProps {
    countryList: ListFrontEndInterface[]
    soleTraderTaps: any
}

export interface initialDetailsInterface {
    categoryDropDownList: ListFrontEndInterface[]
    soleTraderTaps: any
    onCategorySelect: (id: number) => void
}

export interface SoleTraderHomeFormDataInterface {
    soleTraderId: number
    clientNumber: string
    title: string
    firstName: string
    middleName: string
    surName: string
    natureOfBusiness: string
    businessTradingName: string
    clientCategoryId: number
    individualUTR: string
    clientCategoryName: string
    clientCategory: number
}

export interface HomeAddress {
    countryList: ListFrontEndInterface[]
    onDateChange: (country: string) => void
}

export interface PersonalDetails {
    soleTraderTaps: any
    onDateChange: (dateString: string) => void
}

export interface BussinessAddress {
    countryList: ListFrontEndInterface[]
    soleTraderTaps: any
    isEditing: boolean
    toggleEditing: () => void
    onDateChange: (country: string) => void
}

export interface ContactInfoProps {
    soleTraderTaps: ContactInfoInterface
    soleTraderHomeData: any
    languageList: ListFrontEndInterface[]
}

export interface ContactInfoViewProps {
    soleTraderTaps: ContactInfoInterface
}

export interface ContactInfoInterface {
    contactpersonid: number
    registerid: number
    memberperson: string
    registertype: string
    title: string
    firstname: string
    middlename: string
    surname: string
    preferredname: string
    mobilenumber: string
    homenumber: string
    worknumber: string
    emailaddress: string
    altemailaddress: string
    preferredlanguage: number
    languageName: string
}

export interface ClientCompanyActiveService {
    clientCompanyActiveServiceId: number
    companyType: number
    referenceId: number
    serviceId: number
    status: string
    serviceAmount: number
    serviceAmountTotal: number
    subscriptionType: number
    displayType: number
    includeVat: number
    vatAmount: number
    otherServiceDescription: string
}

export interface ClientCompanyControlData {
    clientControlId: number
    clientCompanyControlId: number
    value: string
    companyType: number
    referenceId: number
}
export interface ClientCompanyVerification {
    clientCompanyVerificationId: number
    clientVerificationId: number
    companyType: number
    referenceId: number
    status: string
}

export interface ClientControlData {
    clientControlId: number
    clientCompanyControlId: number
    keyName: string
    keyDataType: string
    description: string
    value: string
}

export interface ClientVerificationData {
    clientCompanyVerificationId: number
    clientVerificationId: number
    CompanyType: number
    clientVerificationName: string
    status: string
    referenceId: number
}

export interface ComplainceDefaultinterface {
    clientCompanyServiceViewList: ServiceData[]
    clientCompanyVerificationViewList: ClientVerificationData[]
    clientControlViewList: ClientControlData[]
}

export interface Complainceprop {
    soleTraderTaps: ComplainceDefaultinterface
    soleTraderId: number
    onbordingId: number
}

export interface ComplaincepropView {
    soleTraderTaps: ComplainceDefaultinterface
}

export interface GenerateEmails {
    clientEmailId: number
    templateId: number
    serviceProcessId: number
    companyTypeId: number
    referenceId: number
    serviceActionId: number
    serviceActionStepId: number
    fromAddress: string
    toAddress: string
    ccAddress: string
    bccAddress: string
    subject: string
    description: string
    IykonsBCCAddress: string
}
export interface ServiceData {
    serviceId: number
    serviceReferenceId: number
    serviceName: string
    status: string
    serviceAmount: number
    serviceAmountTotal: number
    subscriptionType: number
    displayType: number
    includeVat: number
    vatAmount: number
    subscriptionTypeTotal: number
}

export interface TogilleAddress {
    addressLineOne: string
    addressLineTwo: string
    town: string
    country: string
    postCode: string
}

export interface CtStateInterface {
    countryList: ListFrontEndInterface[]
}

export interface PartnershipServiceTapData {
    serviceId: number
    serviceReferenceId: number
    serviceName: string
    status: string
    serviceAmount: number
    serviceAmountTotal: number
    subscriptionType: number
    displayType: number
    includeVat: number
    vatAmount: number
}
export interface PartnershipServiceMainInterface {
    soleTraderTaps: PartnershipServiceTapData[]
    soletrderId: number
}
export interface ParnersgipStateInteface {
    soleTraderTaps: PartnershipServiceTapData[]
}

export interface PayeServiceDataSS {
    payeId: number
    companyType: number
    referenceId: number
    payeReference: string
    accountOfficeReference: string
    payrollFrequency: string
    schemeStartDate: string
    addressLineOne: string
    addressLineTwo: string
    town: string
    country: string
    postCode: string
    gateWayId: string
    password: string
    status: string
    csiFiling: number
    payeProcess: number
    filingMethod: number
    payeProcessName: string
    filingMethodName: string
    hmrcPaymentFrequency: number
    hmrcPaymentFrequencyName: string
}

export interface pensionViewPageData {
    pensionId: number
    companyType: number
    referenceId: number
    letterCode: string
    stagingDate: string
    pensionProvider: string
    hmrcDate: string
    nestEmployerId: string
    nestUserName: string
    nestPassword: string
    employerPW: string
    delegateId: string
    primaryDelegateUserId: string
    primaryDelegatePassword: string
    primaryDelegatePIN: string
    status: string
}
export interface PayeViewPagePropData {
    PayeServiceData: any
    datareFetch: () => void
    soletrderId: number
}
export interface PayeEditpageProps {
    PayeeditData: PayeServiceDataSS
    handleChildFormSave: () => void
    soletrderId: number
    countryList: ListFrontEndInterface[]
}

export interface VatData {
    vatId: number
    companyType: number
    referenceId: number
    vatNumber: string
    vatScheme: string
    vatRegistrationDate: string
    addressLineOne: string
    addressLineTwo: string
    town: string
    country: string
    postCode: string
    effectiveDate: string
    endingDate: string
    dataInput: string
    status: string
    hmrcGatewayId: string
    hmrcPassword: string
    vatFrequency: number
    vatFrequencyName: string
}
export interface VatViewPagePropData {
    VatServiceData: any
}

export interface vatFormInterface {
    vateditdata: VatData
    soletrderId: number
    countryList: ListFrontEndInterface[]
    handleChildFormSave: () => void
}

export interface VatpageStateProp {
    countryList: ListFrontEndInterface[]
}

export interface AnnualAccountData {
    annualAccountId: number
    companyType: number
    referenceId: number
    fromDate: string
    toDate: string
    deadlineDate: string
    status: string
}

export interface PensionData {
    pensionId: number
    companyType: number
    referenceId: number
    letterCode: string
    stagingDate: string
    pensionProvider: string
    hmrcDate: string
    nestEmployerId: string
    nestUserName: string
    nestPassword: string
    employerPW: string
    delegateId: string
    primaryDelegateUserId: string
    primaryDelegatePassword: string
    primaryDelegatePIN: string
    status: string
}
export interface PensionEditFormprops {
    pensioneditData: PensionData
    soletrderId: number
    handleChildFormSave: () => void
}
export interface PensionViewPagePropData {
    PensionServiceData: any
}

export interface AnnualEditData {
    editData: AnnualAccountData
    soletrderId: number
    handleChildFormSave: () => void
}

export interface SoleTraderNewStateInterface {
    categoryDropDownList: ListFrontEndInterface[]
    countryList: ListFrontEndInterface[]
}

export interface RegisterAddress {
    countryList: ListFrontEndInterface[]
    isEditing: boolean
    toggleEditing: () => void
    onDateChange: (country: string) => void
    edit: boolean
    toggleCorrBussEditing: () => void
}

export interface initialState {
    categoryDropDownList: ListFrontEndInterface[]
}

export interface RegisterInterface {
    categoryDropDownList: ListFrontEndInterface[]
    countryList: ListFrontEndInterface[]
    soleTraderTaps: any
}

export interface HomeProps {
    categoryDropDownList: ListFrontEndInterface[]
    countryList: ListFrontEndInterface[]
    soleTraderTaps: SoleTraderHomeData
    soleTraderId: number
}

export interface officerDocumentList {
    companyAttachmentId: number
    title: string
    description: string
    documentBaseId: number
    documentType: number
    documentBaseIcon: string
    attachmentPath: string
    lastUpdateDate: string
    lastUpdateUser: string
    ppExpiryDate: string
    dlExpiryDate: string
    prExpiryDate: string
}

export interface CompanyAttachment {
    companyAttachmentId: number
    title: string
    description: string
    generalOrOfficerType: string
    documentBaseId: number
    documentBaseIcon: string
    attachmentPath: string
    lastUpdateDate: string
    lastUpdateUser: string
    documentType: number
}

export interface CorporateDocumentView {
    soleTraderTaps: CorporateDocuentData
    documenttypeList: ListFrontEndInterface[]
}

export interface CorporateDocuentData {
    generalDocumentList: CompanyAttachment[]
    officerDocumentHeaderList: OfficerData[]
    serviceDocumentList: ServiceDocument[]
}

export interface OfficerData {
    officerPersonOrCorporateType: string
    officerPersonOrCorporateId: number
    documentOwner: string
    documentType: number
    officerDocumentList: officerDocumentList[]
}

export interface ServiceDocument {
    companyAttachmentId: number
    title: string
    description: string
    serviceName: string
    documentBaseId: number
    documentBaseIcon: string
    attachmentPath: string
    lastUpdateDate: string
    lastUpdateUser: string
    documentType: number
    serviceCurrentStatus: string
}

export interface CorporateDocumentSave {
    companyAttachmentId: number
    companyTypeId: number
    referenceId: number
    referenceId2: number
    documentBaseId: number
    documentBaseName: string
    attachmentPath: string
    soleTraderId: number
    type: string
    ppExpiryDate: string
    dlExpiryDate: string
    prExpiryDate: string
}
export interface SoleTraderConfigurationInviteClientInterface {
    paymentOptionDropDownList: ListFrontEndInterface[]
    cancelGoCardlessModal: CallableFunction
}

export interface SoleTraderConfigurationInterface {
    registeredClientSoleTraderConfiguration: any
}
