import { type ListFrontEndInterface } from './CommonType'

export interface EmailTemplateDetailsListDataTypeInterface
    extends EmailTemplateFormDataInterface {
    key: React.Key
}

export interface EmailTemplateDetailsListInterface {
    emailTemplateDetailsList: EmailTemplateDetailsListDataTypeInterface[]
    emailTemplateDetailsListCount: number
}

export interface EmailTemplateFormDataInterface {
    templateId: string
    templateName: string
    templateType: number
    templateTypeName: string
    subject: string
    emailContent: string
    activeStatus: string
    isCommunicationEmail: number
    isFormAmendmentEmail: number
}

export interface EmailTemplateViewDetailsObjPayloadInterface {
    data: EmailTemplateFormDataInterface[]
}

export interface EmailTemplateViewDetailsPayloadInterface {
    emailTemplateDetails: EmailTemplateFormDataInterface
    templateTypeList: ListFrontEndInterface[]
    contentPropertiesList: EmailContentTypeListFrontEndInterface[]
}

export interface EmailContentTypeListBackendInterface {
    stdId: number
    stdName: string
}

export interface EmailContentTypeListFrontEndInterface {
    value: number
    label: string
}

export interface EmailTemplateFormInterface {
    onSave: (
        data: EmailTemplateFormDataInterface,
        callBack: CallableFunction
    ) => void
    editData: EmailTemplateFormDataInterface
}

export interface EmailTemplateDetailsPayloadInterface {
    data: EmailTemplateFormDataInterface[]
    noOfRecords: number
}
