import { SegmentedControl, SegmentedControlProps } from "@mantine/core";
import { FC } from "react";

export enum GroupStatisticsTable {
    BY_DATES,
    BY_CLIENTS,
    BY_STATUSES,
    BY_WAREHOUSES,
    BY_MARKETPLACES,
}

type Props = Omit<SegmentedControlProps, "data">;
const data = [
    {
        label: "По датам",
        value: GroupStatisticsTable.BY_DATES.toString(),
    },
    {
        label: "По клиентам",
        value: GroupStatisticsTable.BY_CLIENTS.toString(),
    },
    {
        label: "По статусам",
        value: GroupStatisticsTable.BY_STATUSES.toString(),
    },
    {
        label: "По складам отгрузки",
        value: GroupStatisticsTable.BY_WAREHOUSES.toString(),
    },
    {
        label: "По маркетплейсам",
        value: GroupStatisticsTable.BY_MARKETPLACES.toString(),
    },
];

export const ProfitTableSegmentedControl: FC<Props> = props => {
    return (
        <SegmentedControl
            data={data}
            {...props}
        />
    );
};