import type { ColumnDef } from '@tanstack/vue-table';
export declare const customFieldsByBusiness: Record<string, {
    code: string;
    name: string;
}>;
interface NetsuiteCustomOptionType {
    code: string;
    name: string;
    childName: string;
    externalId: string;
    fmMeasurementId?: string;
    fmMeasurementAbbrev?: string;
    remark?: string;
}
interface NetSuiteSettingOption {
    item: FdoNetSuiteItem;
    childItems: FdoNetSuiteChildItem[];
    unit: FdoNetSuiteUnitType;
    units: Record<string, FdoNetSuiteUnitType>;
}
export interface NetSuiteState {
    setting: Omit<FdoNetSuiteSetting, 'realm' | 'accessToken'>;
    businessSubsidiaryName: string;
    vendorSubsidiary: Record<string, string>;
    skuSubsidiaries: Record<string, {
        includeChildren: boolean;
        flattenedSubsidiaryNames: string[];
        subsidiaryTree: Array<FdoNetSuiteSubsidiaryWithChildren & {
            isAssigned?: boolean;
        }>;
    }>;
    isReady: boolean;
    skuOptions: Record<string, NetSuiteSettingOption>;
    itemReplicas: FdoNetSuiteItemReplica[];
}
export declare function useNetSuiteStore(): {
    readonly customFieldOptions: Record<string, {
        label: string;
        value: NetsuiteCustomOptionType;
    }[]>;
    checkCustomFieldCodes(args: {
        beforeStart?: () => Promise<void>;
        templateItems: FdoPurchaseOrderTemplateItem[];
    }): Promise<Record<number, string>>;
    transferTemplateColumnDefs(args: {
        onUpdate: (index: number, sku: FdoInventorySku, code: string, measurement?: FdoUnitMeasurement) => void;
    }): Record<number, ColumnDef<FdoPurchaseOrderTemplateItem>>;
    readonly skuSettingOptions: Record<string, NetSuiteSettingOption>;
    readonly inventoryTransferOutEnabled: boolean;
    readonly isReady: boolean;
    readonly isEnabled: boolean;
    readonly isBusinessLocation: boolean;
    readonly businessSubsidiaryId: string | null | undefined;
    readonly businessSubsidiaryName: string;
    readonly state: {
        setting: {
            _id: string;
            enable: boolean;
            items: {
                name?: string | null | undefined;
                externalId?: string | null | undefined;
                itemType?: string | null | undefined;
                itemSubType?: string | null | undefined;
                cogsAccount?: {
                    id: string;
                    refName: string;
                } | null | undefined;
                pktCode?: string | null | undefined;
                pktName?: string | null | undefined;
                id: string;
                netSuiteId: string;
                unitTypeId: string;
                unitOfMeasureId: string;
                subsidiaryIds: string[];
                includeChildren: boolean;
            }[];
            syncedAt?: string | null | undefined;
            subsidiaryId?: string | null | undefined;
            restlet?: {
                type: "createItemReceipt" | "retrieveRecordInfo";
                scriptId: string;
                deploymentId: string;
            }[] | null | undefined;
            locations: {
                type: "restaurant" | "warehouse";
                name: string;
                id: string;
                netSuiteId: string;
                subsidiaryId: string;
            }[];
            childItems: {
                name?: string | null | undefined;
                externalId?: string | null | undefined;
                itemType?: string | null | undefined;
                itemSubType?: string | null | undefined;
                cogsAccount?: {
                    id: string;
                    refName: string;
                } | null | undefined;
                pktCode?: string | null | undefined;
                pktName?: string | null | undefined;
                netSuiteId: string;
                parentNetSuiteId: string;
                unitTypeId: string;
                unitOfMeasureId: string;
                subsidiaryIds: string[];
                includeChildren: boolean;
            }[];
            units: {
                id: string;
                measurements: {
                    id: string;
                    netSuiteId: string;
                }[];
                netSuiteId: string;
                baseUnitUnitOfMeasureId: string;
            }[];
            subsidiaries: {
                parentId?: string | undefined;
                name: string;
                id: string;
                country: string;
                currency: string;
            }[];
            vendors: {
                externalId?: string | null | undefined;
                custentity_financeapproval?: boolean | null | undefined;
                name: string;
                id: string;
                netSuiteId: string;
                subsidiaryId: string;
            }[];
        };
        businessSubsidiaryName: string;
        vendorSubsidiary: Record<string, string>;
        skuSubsidiaries: Record<string, {
            includeChildren: boolean;
            flattenedSubsidiaryNames: string[];
            subsidiaryTree: ({
                parentId?: string | undefined;
                name: string;
                id: string;
                country: string;
                currency: string;
            } & {
                fullName?: string | undefined;
                depth: number;
                children: FdoNetSuiteSubsidiaryWithChildren[];
            } & {
                isAssigned?: boolean | undefined;
            })[];
        }>;
        isReady: boolean;
        skuOptions: Record<string, NetSuiteSettingOption>;
        itemReplicas: {
            name?: string | null | undefined;
            externalId?: string | null | undefined;
            syncedAt?: string | null | undefined;
            deletedAt?: string | null | undefined;
            itemSubType?: string | null | undefined;
            parentNetSuiteId?: string | null | undefined;
            cogsAccount?: {
                id: string;
                refName: string;
            } | null | undefined;
            customFields?: Record<string, any> | null | undefined;
            skuCache?: {
                trackingMeasurement?: string | null | undefined;
                isInactive?: boolean | null | undefined;
                convert?: {
                    measurement?: string | null | undefined;
                    inventoryBindings?: {
                        measurement?: {
                            name: string;
                            id: string;
                            abbrev: string;
                            conversion: {
                                amount: number;
                                precision: number;
                            };
                        } | null | undefined;
                        rules?: Record<string, any> | null | undefined;
                        alternatives?: {
                            default?: boolean | null | undefined;
                            trackingMeasurement?: string | null | undefined;
                            priority?: number | null | undefined;
                            _id: string;
                        }[] | null | undefined;
                        type: "RECIPE" | "SKU" | "SKU_GROUP";
                        amount: {
                            amount: number;
                            precision: number;
                        };
                        id: string;
                    }[] | null | undefined;
                } | null | undefined;
                valuation?: "FIFO" | "LIFO" | "FEFO" | "WAVG" | null | undefined;
                defaultCost?: {
                    measurement?: {
                        name: string;
                        id: string;
                        abbrev: string;
                        conversion: {
                            amount: number;
                            precision: number;
                        };
                    } | null | undefined;
                    costPerUnit: {
                        currency: "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOV" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "CRC" | "CUC" | "CUP" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STN" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "USN" | "UYI" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XBC" | "XBD" | "XCD" | "XDR" | "XOF" | "XPD" | "XPF" | "XPT" | "XSU" | "XTS" | "XUA" | "XXX" | "YER" | "ZAR" | "ZMW" | "ZWL";
                        amount: number;
                        precision: number;
                    };
                } | null | undefined;
                operationalGroup?: string | null | undefined;
                thresholds?: {
                    low: number;
                    mid: number;
                } | null | undefined;
                customAttributes?: Record<string, any> | null | undefined;
                unit: {
                    _id: string;
                    name: string;
                    abbrev: string;
                    precision: number;
                    measurements: {
                        name: string;
                        id: string;
                        abbrev: string;
                        conversion: {
                            amount: number;
                            precision: number;
                        };
                    }[];
                };
                code: string;
                _id: string;
                name: string;
            } | null | undefined;
            businessId: string;
            netSuiteId: string;
            itemType: string;
            unitTypeId: string;
            unitOfMeasureId: string;
            subsidiaryIds: string[];
            includeChildren: boolean;
        }[];
    };
    readonly netSuiteItemIdToSkuId: Map<unknown, [string, ...string[]]>;
    readonly netSuiteMeasurementIdToMeasurementId: Map<unknown, [string, ...string[]]>;
    readonly netSuiteItemBySkuId: Map<unknown, [{
        name?: string | null | undefined;
        externalId?: string | null | undefined;
        itemType?: string | null | undefined;
        itemSubType?: string | null | undefined;
        cogsAccount?: {
            id: string;
            refName: string;
        } | null | undefined;
        pktCode?: string | null | undefined;
        pktName?: string | null | undefined;
        id: string;
        netSuiteId: string;
        unitTypeId: string;
        unitOfMeasureId: string;
        subsidiaryIds: string[];
        includeChildren: boolean;
    }, ...{
        name?: string | null | undefined;
        externalId?: string | null | undefined;
        itemType?: string | null | undefined;
        itemSubType?: string | null | undefined;
        cogsAccount?: {
            id: string;
            refName: string;
        } | null | undefined;
        pktCode?: string | null | undefined;
        pktName?: string | null | undefined;
        id: string;
        netSuiteId: string;
        unitTypeId: string;
        unitOfMeasureId: string;
        subsidiaryIds: string[];
        includeChildren: boolean;
    }[]]>;
    readonly unitByNetsuiteId: Map<unknown, [{
        _id: string;
        name: string;
        abbrev: string;
        precision: number;
        measurements: {
            name: string;
            id: string;
            abbrev: string;
            conversion: {
                amount: number;
                precision: number;
            };
        }[];
    }, ...{
        _id: string;
        name: string;
        abbrev: string;
        precision: number;
        measurements: {
            name: string;
            id: string;
            abbrev: string;
            conversion: {
                amount: number;
                precision: number;
            };
        }[];
    }[]]>;
    readonly measurementByNetsuiteId: Map<unknown, [{
        name: string;
        id: string;
        abbrev: string;
        conversion: {
            amount: number;
            precision: number;
        };
    } | undefined, ...({
        name: string;
        id: string;
        abbrev: string;
        conversion: {
            amount: number;
            precision: number;
        };
    } | undefined)[]]>;
    readonly configuredLocations: {
        type: "restaurant" | "warehouse";
        name: string;
        id: string;
        netSuiteId: string;
        subsidiaryId: string;
    }[];
    readonly currentLocationSetting: {
        type: "restaurant" | "warehouse";
        name: string;
        id: string;
        netSuiteId: string;
        subsidiaryId: string;
    } | undefined;
    readonly isCurrentLocationBindedToNetSuite: boolean;
    getNetSuiteVendor(supplierId: string): FdoNetSuiteVendor | undefined;
    getNetSuiteLocation(locationId: string): FdoNetSuiteLocation | undefined;
    getSubsidiaryFullName(subsidiaryId?: string | null): {
        id: string | undefined;
        name: string;
        fullName: string;
    };
    getLocationSubsidiary(netSuiteLocationId?: string | null): {
        id: string | undefined;
        name: string;
        fullName: string;
    };
    currentLocationSubsidiary(): {
        id?: string;
        name: string;
        fullName: string;
    };
    currentVendorSubsidiary(vendorId: string): {
        id?: string;
        name: string;
        fullName: string;
    };
    readonly subsidiaryOptions: {
        label: string;
        value: FdoPurchaseOrderSubsidiaryNetSuiteSetting;
    }[];
    getBusinessSubsidiaryTree(): FdoNetSuiteSubsidiaryWithChildren[];
    getBusinessSubsidiaryPath(): string[];
    getAvailableItems(subsidiaryId?: string | null): string[];
    getAvailableMeasurements(skuId: string, subsidiaryId?: string | null): string[];
    readSetting(): Promise<void>;
    updateLocationConfigs(payload: Record<string, {
        netsuiteId: string;
        name: string;
    }>): Promise<any>;
    updateSupplierConfigs(payload: Record<string, {
        netsuiteId: string;
        name: string;
        subsidiaryId: string;
        subsidiaryName: string;
    }>): Promise<any>;
    getAllItemReplicas(): Promise<void>;
    getNetSuiteVendorOptions(): Promise<NSDtoVendorSuiteQLOption[]>;
    getNetSuiteLocations(): Promise<any>;
    getVendorSubsidiaryName(supplierId: string): string;
    getSkuSubsidiaries(skuId: string): {
        includeChildren: boolean;
        flattenedSubsidiaryNames: string[];
        subsidiaryTree: Array<FdoNetSuiteSubsidiaryWithChildren & {
            isAssigned?: boolean;
        }>;
    };
    syncPurchaseOrder(args: {
        locationId?: string;
        purchaseOrderId: string;
        netsuiteId?: string | null;
        netsuiteRecordType?: string | null;
    }): Promise<void>;
    getItemCustomCode(sku: FdoInventorySku, measurementId?: string | null): string | null;
    getNetSuiteLocationOptions(): Promise<{
        netsuiteId: string;
        name: string;
        subsidiaryName: string;
        subsidiaryId: string;
    }[]>;
    getItemAverageCosts(): Promise<Record<string, number>>;
};
export type FdoNetSuiteSubsidiaryWithChildren = FdoNetSuiteSubsidiary & {
    fullName?: string;
    depth: number;
    children: FdoNetSuiteSubsidiaryWithChildren[];
};
export declare function filterSubsidiaryTree(tree: FdoNetSuiteSubsidiaryWithChildren[], assignedSubsidiaryIds: string[], includeChildren: boolean): Array<FdoNetSuiteSubsidiaryWithChildren & {
    isAssigned?: boolean;
}>;
export declare function buildSubsidiaryTree(data: FdoNetSuiteSubsidiary[], subsidiaryId?: string | null): {
    tree: FdoNetSuiteSubsidiaryWithChildren[];
    available: string[];
    flat: FdoNetSuiteSubsidiaryWithChildren[];
    flatMapping: Record<string, string[]>;
};
export declare const netsuiteCustomFields: Record<string, (item?: FdoNetSuiteItem, itemChild?: FdoNetSuiteChildItem) => string>;
export {};
