// Interfaces
import { SuggestiveInterface } from "./user/suggestive-interface"
import { UserSearchInterFace } from "./user/user-search"
import { UtilitiesService } from "../services/utilities/utilities.service"

export interface CommonInterfaces {
}

export interface ModalConfig {
    showHeader: boolean,
    title: string,
    class?: string,
    minWidth?: string,
    showClose?: boolean
}

export interface SearchData {
    fromDate: string,
    toDate : string,
    ndc : string,
    orderId : string,
    winnerId : string,
    status : string,
    paymentStatus : string,
    supplierName : string,
    productName : string
}

export interface CntrlRatioConfig {
    disableDropDown : boolean,
    disableCntrlStmt : boolean,
    disableValueTxtBx : boolean,
    disableUnitTxtBx : boolean,
    cntrlStmtValidationMsg : string,
    ratioArray : string[],
    unitRatio : string,
    amountRatio : string,
    noRatio : string,
    isUnitRatioTxtBxNotValid : boolean,
    isAmountRatioTxtBxNotValid : boolean,
    isControlStmtNotValid : boolean,
    disableCntrlElemnts : boolean
}

export interface getStatusListInterface {
    success: boolean,
    data: [
        {
            id: number,
            status: string
        },
    ],
}

export interface saveAccountInfo {
    success: boolean,
    data: boolean,
}

export interface uploadDocument {
    success: boolean,
    data: {
        upload: string,
        document: string,
        message?: string
    },
}

export interface verifyDirectAccount {
    success: boolean,
    data: number | boolean,
}

export interface getPaymentTypesInfoInterface {
    success: boolean,
    data: [
        {
            id: number,
            payment_type: string
        }
    ],
}

export interface cntrlRatioInfoInterface {
    ratio_settings: string,
    ratio_unit_numerator: number,
    ratio_unit_denominator: number,
    ratio_value_numerator: number,
    ratio_value_denominator: number,
    controls_statement_enabled: number | boolean,
    controls_statement: string
}

export interface creditTermsInfoInterface {
    success: boolean,
    data: [
        {
            id: number,
            credit_term: string
        },
    ],
}

export interface classificationsInfoInterface {
    success: boolean,
    data: [
        {
            id: number,
            name: string
        },
    ],
}

export interface businessTypesInterface {
    success: boolean,
    data: [
        {
            account_specialty_id: number,
            as_name: string,
            sort_order: number,
            account_classification_id: number
        },
    ],
}

export interface activeADRInterface {
    success: boolean,
    data: [
        {
            code: string,
            mfr: string
        }
    ],
}

export interface scheduleControlListInterface {
    success: boolean,
    data: {},
}

export interface carriersInterface {
    success: boolean,
    data: [
        {
            carrier_id: number,
            name: string,
            active: number,
        },
    ],
}

export interface  saveMainSettingsInterface {
    success: boolean,
    data: {},
}

export interface addProductPayloadInterface {
    allocation: string,
    category: string,
    end_time: string,
    lot_no: string,
    manufacturer: string,
    manufacturer_name:string,
    min_purchase_quantity: number,
    name: string,
    ndc : string,
    ndc_code542: string,
    flag_as_dme: number,
    package_description: string,
    package_size: number,
    package_size_um: string,
    product_expiration: string,
    product_trade_name: string,
    quantity: string,
    selling_price: string,
    strength: string,
    supplier_product_id: string,
    updateQuantity: boolean,
    no_ndc_code: boolean
}

export interface getCategoriesListInterfcae {
    success: boolean,
    data: [
        {
            id: number,
            title: string,
            name: string,
        }
    ],
}

export interface getNDCInfoInterfcae {
    success: boolean,
    data: {
        [key: string]: {
            product_trade_name: string,
            ndc_code542: string,
            strength: string,
            package_size: number,
            package_size_um: string,
            manufacturer_name: string,
            min_purchase_quantity: number
        },
        isChildOfPrime: any | boolean
    },
}

export interface getUserSpecificPaymentTypesInterface {
    success: boolean,
    data: number[], 
}

export interface searchResultInterface {
    lowest: {
        manufacturer: any[],
        price: number[],
        unit: number[]
    },
    other: [
        SuggestiveInterface['data'][0]['rows']['result'][0][]
    ]
}

export interface resultInterface {
    product_trade_name?: string,
    strength?: string,
    dosage_form?: string,
    package_size?: string,
    ndc_code542?: string,
    qty?: number,
    fromPrice?: string,
    toPrice?: string
}

export interface searchRenderInterface {
    other: [
        SuggestiveInterface['data'][0]['rows']['result'][0][]
    ],
    shippingInfo: UserSearchInterFace['data']['search_result']['shippingInfo'],
    searchAltNdcResult: SuggestiveInterface['data'][0]['rows']['result'][0][],
    searchNdcResult: SuggestiveInterface['data'][0]['rows']['result'][0][],
    otherConfig: {
        limit: number,
        sortable: boolean,
        filter: boolean,
        searchOrder: string,
    },
    selectedSortMenuItem: {
        value:  string,
        text: string,
        alternate: string
    },
    isempty: boolean,
    isloading: boolean,
    isAdvFilterApplied?: boolean,
    elsevierProductData: resultInterface,
    wacSpreadPercentage?: number,
}

export interface searchURLParamsInterface {
    searchTerm: string,
    catCode: string,
    NDCSpecific: boolean,
    searchType : string,
    saveOnNDC: boolean | string,
    lowPrice: string,
    searchLabel: string
}

export interface TopPurchasedProducts {
    data: SuggestiveInterface['data'][string]['rows']['result'][0][],
    shippingOptions: SuggestiveInterface['data'][string]['rows']['shippingInfo'],
    config: {
        title: string,
        minimumRows: number,
        isempty: boolean,
        isloading: boolean,
        btnText: string,
        maximumRows?: number
    },
    postRequestSent: boolean,
    isFromDispensing?: boolean
}

export interface DocumentConfig {
    param: string,
    errorMsg?: string,
    accFileTypes: string[],
    uploadStatus?: boolean,
    successMsg?: string,
    autoUpload?: boolean,
    inputClass?: string,
    buttonName?: string,
    buttonClass?: string,
    statusMsgClass?: string,
    className?: string,
    successTxtCls?: string,
    error?: boolean,
    hideStatusMsg?: boolean,
    uploadBtnClass?: string
}

export interface ColumnConfig {
    name: string,
    alias: string
}

export interface lane4AdDataInterface {
    ndc: string,
    pageName: string
}