import {MarketplaceSchema} from "../../../../client";
import {MRT_ColumnDef} from "mantine-react-table";
import {useMemo} from "react";
import {ActionIcon, Image} from "@mantine/core";

const useMarketplacesTableColumns = () => {
    return useMemo<MRT_ColumnDef<MarketplaceSchema>[]>(() => [
        {
            header: "Маркетплейс",
            size: 10,
            Cell: ({row}) => (
                <ActionIcon variant={"transparent"}>
                    <Image src={row.original.baseMarketplace?.iconUrl || ""}/>
                </ActionIcon>
            )
        },
        {
            accessorKey: "name",
            header: "Название",
            enableSorting: false,
        },
        {
            accessorKey: "client.name",
            header: "Клиент",
            enableSorting: false,
        },
        // {
        //     accessorKey: "authData",
        //     header: "Данные авторизации",
        //     enableSorting: false,
        // },
    ], []);
}

export default useMarketplacesTableColumns;