import { ColumnDef } from "@tanstack/react-table"; import clsx from "clsx"; import noop from "lodash/noop"; import { useState } from "react"; import { useI18n } from "../../../hooks/useI18n.js"; import { ActionType, type FormOptions } from "../../../interfaces"; import { Select } from "../../../molecules/forms/select/Select"; import { Table, type TableProps } from "../../../molecules/table/Table"; import { iconClass } from "../../../utils/iconClass"; export type ActionsTableProps = Omit, "columns"> & { onAddAction?: (actionName: string) => void; availableActions?: { label: string; value: string }[]; i18n?: FormOptions["i18n"]; }; export function ActionsTable({ availableActions = [], onAddAction = noop, ...props }: ActionsTableProps) { const { t } = useI18n(props.i18n); const [currentAction, setAction] = useState(""); const columns: ColumnDef[] = [ { header: t("Action"), accessorKey: "title" } ]; return (
); }