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

export enum TransactionType {
    EXPENSE,
    INCOME,
}

type Props = Omit<SegmentedControlProps, "data">;
const data = [
    {
        label: "Расходы",
        value: TransactionType.EXPENSE.toString(),
    },
    {
        label: "Доходы",
        value: TransactionType.INCOME.toString(),
    },
];

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