import {
    IconBox,
    IconColumns,
    IconUsers,
} from "@tabler/icons-react";
import {
    ProductsTab,
    CommonServicesTab,
    FulfillmentBaseTab,
    ClientsTab,
} from "./dealModularEditorTabs";
import ModulesType from "./types";

export enum ModuleNames {
    FULFILLMENT_BASE = "fulfillment_base",
    CLIENTS = "clients",
}

const MODULES: ModulesType = {
    [ModuleNames.FULFILLMENT_BASE]: {
        info: {
            id: 1,
            key: "fulfillment_base",
            label: "Фулфиллмент",
        },
        tabs: [
            {
                label: "Товары",
                key: "products",
                icon: <IconBox />,
                device: "mobile",
                tab: (props: any) => <ProductsTab {...props} key={"products"} />,
            },
            {
                label: "Услуги",
                key: "common_services",
                icon: <IconColumns />,
                device: "mobile",
                tab: (props: any) => <CommonServicesTab {...props} key={"common_services"} />,
            },
            {
                label: "Фулфиллмент",
                key: "fulfillment_base",
                icon: <IconBox />,
                device: "desktop",
                tab: (props: any) => <FulfillmentBaseTab {...props} key={"fulfillment_base"} />,
            },
        ]
    },
    [ModuleNames.CLIENTS]: {
        info: {
            id: 2,
            key: "clients",
            label: "Клиенты",
        },
        tabs: [
            {
                label: "Клиент",
                key: "clients",
                icon: <IconUsers />,
                device: "both",
                tab: (props: any) => <ClientsTab {...props} key={"clients"} />,
            },
        ]
    },
};

export default MODULES;
