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

export interface CorporateListDataTypeInterface
    extends CorporateFormDataInterface {
    key: React.Key
}

export interface CopareateListStateInterface {
    corporateList: CorporateListDataTypeInterface[]
    corporateListCount: number
    serviceId: number
}
export interface CorporateListInterface {
    corporateList: CorporateListDataTypeInterface[]
    corporateListCount: number
    selectedCategoryId: number
    selectedServiceId: number
}

export interface Category {
    id: number
    name: string
}

export interface CorporateFormDataInterface {
    corporateid: string
    companyname: string
    companyregisternumber: string
    clientType: string
    clientcategoryid: number
    clientcategory: string
    clientnumber: string
    activestatus: string
    serviceIds: string
    contactName: string
    mobilenumber: string
    emailAddress: string
    alternativeEmailAddress: string
    defaultUser: string
    defaultAssigneeUser: string
}

export interface CorporateChatInterface {
    corporateid: string
    ReferenceId: number
    Description: string
    userIds: number[]
    BusinessTypeId: number
    IsClientCommunication: number
}

export interface CorporateFormInterface {
    clientDropDownList: ListFrontEndInterface[]
}

export interface CorporatePayloadInteface {
    data: CorporateFormDataInterface[]
    noOfRecords: number
}

export interface CorporateExpandViewInterface {
    corporateData: CorporateListDataTypeInterface
}

export interface CorporateChatPropsInterface {
    userList: User[]
    corporateid: number
}

export interface FormValues {
    index: number
    buttonName: string
}

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

export interface CorporateChatProps extends CorporateChatStateInterface {
    corporateid: number
}

export interface CorporateViewState {
    companyNumber: number
    tabIndex: number
    clientTypeId: number
    initialDetails: any
    activeButton: number
    showCoporateList: boolean
}

export interface HomeProps {
    categoryDropDownList: ListFrontEndInterface[]
    countryList: ListFrontEndInterface[]
    corporateTaps: CorporateTaps
    corporateId: number
    selectedCategoryId?: number
}

export interface RegisterInterface {
    categoryDropDownList: ListFrontEndInterface[]
    countryList: ListFrontEndInterface[]
    corporateTaps: CorporateTaps
}

export interface initialDetailsInterface {
    categoryDropDownList: ListFrontEndInterface[]
    corporateTaps: CorporateTaps
    onDateChange: (dateString: string) => void
    onCategorySelect: (id: number) => void
}

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

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

export interface TapIndexPayloadInterface {
    data: CorporateTaps
}

export interface TapFormDataInterface {
    companyNumber: string
    tabIndex: number
    clientTypeId: number
}

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 ClientVerificationData {
    clientCompanyVerificationId: number
    clientVerificationId: number
    CompanyType: number
    clientVerificationName: string
    status: string
    referenceId: number
}

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

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 ClientCompanyVerification {
    clientCompanyVerificationId: number
    clientVerificationId: number
    companyType: number
    referenceId: number
    status: string
}

export interface CorporateData {
    companyregisternumber?: number
    clientTypeId?: number
    companyName?: string
    clientnumber?: string
    clientType?: string
}

export interface CorporateNewForm {
    clientTypeDropDownList: ListFrontEndInterface[]
    CorporateListInterface: CorporateListInterface[]
}

export interface CorporateTap {
    corporateTaps: any
    corporateList: any
}

export interface CorporateListStateInterface {
    corporateList: any
    corporateListCount: any
    serviceId: any
}

export interface CorporateNewStateInterface {
    clientTypeDropDownList: ListFrontEndInterface[]
}
export interface ServiceCorporateTaps {
    data: any
    serviceReferenceId: number
    addressLineOne: string
    addressLineTwo: string
    cT600Id: number
    companyUTR: string
    country: string
    postCode: string
    status: string
    town: string
    vatId: number
    vatNumber: string
    vatScheme: string
    vatRegistrationDate: string
    effectiveDate: string
    endingDate: string
    dataInput: string
    hmrcGatewayId: string
    hmrcPassword: string
    vatFrequency: number
    vatFrequencyName: string
    PayeId: number
    companyType: number
    accountOfficeReference: string
    csiFiling: number
    filingMethod: number
    filingMethodName: string
    gateWayId: string
    hmrcPaymentFrequency: number
    hmrcPaymentFrequencyName: string
    password: string
    payeId: number
    payeProcess: number
    payeProcessName: string
    payeReference: string
    payrollFrequency: string
    schemeStartDate: string
    HMRCGatewayId: string
    pensionId: 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
}
export interface CorporateOfficerView {
    referenceId: number
    type: string
    titleOrCompanyName: string
    firstNameOrBRNo: string
    middleName: string
    surName: string
    dateOfBirth: string
    postCode: string
    addressLineOne: string
    addressLineTwo: string
    niNumber: string
    mobileNo: string
    homeNo: string
    workNo: string
    email: string
    nationality: string
    occupation: string
    countryOfResidence: string
    dateofAppointment: string
    alternativeEmail: string
    town: string
    country: string
    countryId: number
    shareHoldingPercentage: number
    noOfShares: number
    shareHolderTypeId: number
    shareHolderTypeName: string
    officerRole: string
    individualClientNumber: string
    individualId: number
    isNewShareHolder: number
    companyNumber: string
    officerRoleInformationList: officerRoleInformationList[]
}

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 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 expiryDate {
    ppExpiryDate: string
    dlExpiryDate: string
    prExpiryDate: string
}
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 CorporateDocuentData {
    generalDocumentList: CompanyAttachment[]
    officerDocumentHeaderList: OfficerData[]
    serviceDocumentList: ServiceDocument[]
}

export interface CorporateDoucmentOfficerExpandView {
    expandData: officerDocumentList[]
}
export interface CorporateDocumentView {
    corporateTabs: CorporateDocuentData
    documenttypeList: ListFrontEndInterface[]
}

export interface CorporateDocumentSave {
    companyAttachmentId: number
    companyTypeId: number
    referenceId: number
    referenceId2: number
    documentBaseId: number
    documentBaseName: string
    attachmentPath: string
    corporateId: number
    type: string
    ppExpiryDate: string
    dlExpiryDate: string
    prExpiryDate: string
}

export interface officerRoleInformationList {
    type: string
    referenceId: number
    memberType: string
    dateOfAppointment: string
}

export interface OfficerDetailsFormInterface {
    editData: CorporateOfficerView
    countryList: ListFrontEndInterface[]
}

export interface OfficerDetailsFormInterfacePerson {
    editData: CorporateOfficerView
    countryList: ListFrontEndInterface[]
}

export interface officerAddShareholderCorporate {
    membercorporateid: number
    companyname: string
    companynumber: string
    corpaddress1: string
    corpaddress2: string
    corptown: string
    corpcountry: string
    corppostcode: string
    dateofappointment: string
    shareholdingpercentage: number
    shareholdertypeid: number
    noofshares: number
    corporateid: number
    isNewShareHolder: number
}

export interface officerAddShareholderPerson {
    memberpersonid: number
    title: string
    firstname: string
    middlename: string
    surname: string
    dateofbirth: string
    address1: string
    address2: string
    town: string
    country: string
    postcode: string
    mobilenumber: string
    homenumber: string
    worknumber: string
    emailaddress: string
    altemailaddress: string
    ninumber: string
    nationality: string
    occupation: string
    shareholdingpercentage: number
    noofshares: number
    shareholdertypeid: number
    dateofappointment: string
    corporateid: number
    isNewShareHolder: number
}

export interface TogilleAddress {
    addressLineOne: string
    addressLineTwo: string
    town: string
    country: string
    postCode: string
}
export interface vatFormInterface {
    vateditdata: ServiceCorporateTapss
    corporateid: number
    countryList: ListFrontEndInterface[]
    handleChildFormSave: () => void
}

export interface officerAddShareholderCorporateDetails {
    onSave: (data: CorporateOfficerView, callBack: CallableFunction) => void
    member: CorporateOfficerView
}

export interface officerAddShareholderPersonDetails {
    onSave: (data: CorporateOfficerView, callBack: CallableFunction) => void
    member: CorporateOfficerView
}
export interface CorporateTaps {
    initialDetails?: {
        corporateid?: number
        clienttypeid?: number
        clientcategory?: string
        dateofincorporation?: string
        companytradingname?: string
        tradecommencementdate?: string
        turnover?: number
        authenticationcode?: string
        clientcategoryid?: number
    }
    registerOfficeAddress?: {
        regaddress1?: string
        regaddress2?: string
        regtown?: string
        regcountry?: string
        regpostcode?: string
    }
    sicCodes?: string[]
    businessAddress?: {
        busaddress1?: string
        busaddress2?: string
        bustown?: string
        buscountry?: string
        buspostcode?: string
    }
    correspondanceAddress?: {
        corraddress1?: string
        corraddress2?: string
        corrtown?: string
        corrcountry?: string
        corrpostcode?: string
    }
    dateOfTermSigned?: string
}

export interface CorporateHomeFormDataInterface {
    companytradingname: string
    corrpostcode: string
    corrcountry: string
    corrtown: string
    corraddress2: string
    corraddress1: string
    buspostcode: string
    buscountry: string
    bustown: string
    busaddress2: string
    busaddress1: string
    authenticationcode: string
    turnover: number
    tradecommencementdate: string
    corporateid: number
    clienttypeid: number
    clientcategoryid: number
    regaddress1: string
    regaddress2: string
    regtown: string
    regcountry: string
    regpostcode: string
    Code1: string
    Code2: string
    Code3: string
    Code4: string
    clientCategory: string
    date: string
    DateofIncorporation: string
}

export interface CorporateHomeApi {
    companytradingname: string
    corrpostcode: string
    corrcountry: string
    corrtown: string
    corraddress2: string
    corraddress1: string
    buspostcode: string
    buscountry: string
    bustown: string
    busaddress2: string
    busaddress1: string
    authenticationcode: string
    turnover: number
    tradecommencementdate: string
    corporateid: number
    clienttypeid: number
    clientcategoryid: number
}

export interface HomeStateProps {
    categoryDropDownList: ListFrontEndInterface[]
    countryList: ListFrontEndInterface[]
    corporateTaps: CorporateTaps
}

export interface initialState {
    categoryDropDownList: ListFrontEndInterface[]
}

export interface BussinesAddressInterface extends HomeProps {
    isEditing: boolean
    toggleEditing: () => void
}

export interface BussinessStateProps {
    countryList: ListFrontEndInterface[]
    corporateTaps: CorporateTaps
}

export interface CorporateCreateTaskInterface {
    serviceDropDownList: ListFrontEndInterface[]
    userList: ListFrontEndInterface[]
    priorityDropDownList: ListFrontEndInterface[]
    onClose: () => void
}

export interface CorporateCreateTaskStateInterface {
    serviceDropDownList: ListFrontEndInterface[]
    userList: ListFrontEndInterface[]
    priorityDropDownList: ListFrontEndInterface[]
}

export interface CreateTaskInterface {
    TaskId: number
    TaskName: string
    PriorityId: number
    SortOrder: number
    TaskType: number
    ClientName: string
    BusinessType: number
    ReferenceId: number
    ServiceId: number
    ServiceReferenceId: number
    AssignedBy: number
    AssignedTo: number
    FromDate: string
    ToDate: string
    StatusId: number
    NotifyToStatusChange: number
    Description: string
    RecurringFrequency: number
    RecurringFrequencyType: number
    RecurringFrequencyPeriodId: number
    RecurringEnds: number
    RecurringOccurrence: number
    RecurringEndsOn: string
    IsRepeatOnSun: number
    IsRepeatOnMon: number
    IsRepeatOnTue: number
    IsRepeatOnWed: number
    IsRepeatOnThu: number
    IsRepeatOnFri: number
    IsRepeatOnSat: number
}

export interface CorporateConfigurationInviteClientInterface {
    paymentOptionDropDownList: ListFrontEndInterface[]
    cancelGoCardlessModal: CallableFunction
}

export interface DirectDebitCustomerInterface {
    CustomerId: number
    ApplicationId: number
    ReferenceId: number
    ClientCategoryId: number
    BusinessTypeId: number
    CompanyName: string
    GivenName: string
    FamilyName: string
    Email: string
    AddressLine1: string
    AddressLine2: string
    AddressLine3: string
    City: string
    PostalCode: string
    CountryCode: string
    Region: string
    Language: string
    PhoneNumber: string
    DanishIdentityNumber: string
    SwedishIdentityNumber: string
    Description: string
    RegisterToken: string
    PaymentOptionId: number
}

export interface CorporateConfigurationInterface {
    registeredClientCorporateConfiguration: any
}
export interface ContactInfoInterface {
    contactpersonid: number
    registerid: number
    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 ContactInfoDataTabs {
    corporateTaps: ContactInfoInterface
    corporateid: number
}

export interface ContactInfoOfficerData {
    memberPerson: string
}
export interface ContactInfoOfficerDatas {
    corporateTaps: ContactInfoInterface
}

export interface ContactEditData {
    editdata: ContactInfoInterface | null
    isEditMode: boolean
    corporateid: number
    onSave: (data: ContactInfoInterface, saveCallBack: CallableFunction) => void
    setIsEditMode: React.Dispatch<React.SetStateAction<boolean>>
    contactInfoPersonDropDownList: ListFrontEndInterface[]
}

export interface ContactInfoOfficerDataProp {
    officerDataContactInfo: ContactInfoOfficerData
}
export interface Officer {
    referenceId: string
    titleOrCompanyName: string
    firstNameOrBRNo: string
    middleName: string
    surName: string
    type: string
    // Add other properties as needed
}
export interface ComplainceDefaultinterface {
    clientCompanyServiceViewList: ServiceData[]
    clientCompanyVerificationViewList: ClientVerificationData[]
    clientControlViewList: ClientControlData[]
}
export interface Complainceprop {
    corporateTabs: ComplainceDefaultinterface
    corporateId: number
    onbordingId: number
}
export interface ComplaincepropView {
    corporateTabs: 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 CorporateServicesVatView {
    VATServiceData?: any
    PensionServiceData?: any
    PAYEServiceData?: any
    ctServiceData?: CompanyCTDetails
}

export interface CorporateServicesView {
    corporateTaps: ServiceCorporateTaps
    corporateid: number
}

export interface CTFormInterface {
    onSave: (
        data: ServiceCorporateTaps,
        callBack: CallableFunction,
        saveCallBack: CallableFunction
    ) => void
    countryList: ListFrontEndInterface[]
}

export interface CtStateInterface {
    countryList: ListFrontEndInterface[]
}

export interface ServiceStateInterface {
    corporateTaps: ServiceCorporateTaps
}
export interface ServicepayeCorporateTapss {
    serviceReferenceId: number
    country: string
    postCode: string
    status: string
    town: string
    hmrcPaymentFrequency: number
    hmrcPaymentFrequencyName: string
    payeId: number
    payeProcess: number
    payeProcessName: string
    payeProcessDate: string
    payeReference: string
    payrollFrequency: string
    schemeStartDate: string
    HMRCGatewayId: string
    accountOfficeReference: string
    csiFiling: number
    filingMethod: number
    filingMethodName: string
    addressLineOne: string
    addressLineTwo: string
    companyType: number
    password: string
    gateWayId: string
}
export interface ServiceCorporateTapss {
    serviceReferenceId: number
    companyType: number
    country: string
    postCode: string
    status: string
    town: string
    vatId: number
    vatNumber: string
    vatScheme: string
    vatRegistrationDate: string
    effectiveDate: string
    endingDate: string
    dataInput: string
    hmrcGatewayId: string
    hmrcPassword: string
    vatFrequency: number
    vatFrequencyName: string
    addressLineOne: string
    addressLineTwo: string
}
export interface ServiceCorporateTapssave {
    referenceId: number
    companyType: number
    country: string
    postCode: string
    status: string
    town: string
    vatId: number
    vatNumber: string
    vatScheme: string
    vatRegistrationDate: string
    effectiveDate: string
    endingDate: string
    dataInput: string
    hmrcGatewayId: string
    hmrcPassword: string
    vatFrequency: number
    vatFrequencyName: string
    addressLineOne: string
    addressLineTwo: string
}
export interface ServiceCorporatepension {
    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 ServiceCorporatepaye {
    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
    payeProcessDate: string
}

interface InitialDetails {
    corporateid: number
    clienttypeid: number
    clienttype: string
    clientcategoryid: number
    clientcategory: string
    clientnumber: string
    companyregnumber: string
    companyname: string
    companytradingname: string
    dateofincorporation: string // ISO 8601 date string
    tradecommencementdate: string // ISO 8601 date string
    turnover: string // Assuming this is a string representation of a number
    authenticationcode: string
}

// Define the structure of the register office address
interface Address {
    regaddress1: string
    regaddress2: string
    regtown: string
    regcountry: string
    regpostcode: string
}

// Define the main structure combining all parts
export interface ClientData {
    initialDetails: InitialDetails
    sicCodes: string[]
    registerOfficeAddress: Address
    businessAddress: Address
    correspondanceAddress: Address
    dateOfTermSigned: string // Assuming this is a date string
}

interface PersonHeaderInfo {
    title: string
    firstname: string
    middlename: string
    surname: string
    mobilenumber: string
    homenumber: string
    worknumber: string
    emailaddress: string
    altemailaddress: string
    dateofappointment: string
    address1: string
    address2: string
    town: string
    country: string
    postCode: string
}

export interface ContactOfficerData {
    officerType: number
    referenceId: number
    memberPersonHeaderInfo: PersonHeaderInfo
    memberCompanyHeaderInfo: null
}

export interface ContactOfficerIntrface {
    data: ContactOfficerData
}
export interface ContactInfoStateInterface {
    contactInfoPersonDropDownList: ListFrontEndInterface[]
}

export interface GetEnvelopeData {
    envelopeTitle: string
    envelopeStatus: string
    envelopeSignedPdf: string
    envelopeCreated: string
    envelopeSent: string
    envelopeProcessed: string
}
export interface GetEnvelopeTableData extends GetEnvelopeData {
    key: React.Key
}
export interface GetEnvelopePayLoad {
    data: GetEnvelopeData[]
}
export interface GetEnvelopeStateIntrface {
    getEnvelopData: GetEnvelopeData[]
}
export interface GetenvelopeProps {
    getEnvelopData: GetEnvelopeData[]
    businessId: number
    referenceId: number
}

export interface CompanyCTDetails {
    cT600Id: number
    companyType: number
    referenceId: number
    companyUTR: string
    addressLineOne: string
    addressLineTwo: string
    town: string
    country: string
    postCode: string
    status: string
}
