import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import "./style.scss";
import React from "react";
import { useTable } from "react-table";
const TemplateTableShimmer = ({ numberOfRow = 1, }) => {
    numberOfRow;
    const data = [];
    for (let i = 1; i <= numberOfRow; i++) {
        data.push(i);
    }
    const columns = React.useMemo(() => [
        {
            Header: "Template Name",
            accessor: "name",
            width: "35%",
        },
        {
            Header: "Created By",
            accessor: "createdBy",
        },
        {
            Header: "Usage",
            accessor: "usage",
        },
        {
            Header: "Success Rate",
            accessor: "successRate",
        },
        {
            Header: "Date Created",
            accessor: "createdAt",
            width: "15%",
        },
        {
            accessor: "details",
        },
    ], []);
    const { getTableProps, getTableBodyProps, headerGroups, rows, prepareRow } = useTable({ columns, data });
    return (_jsx("div", { className: "templateTableShimmer-Generic", children: _jsxs("table", { className: "searchTemplateTable--Generic ", ...getTableProps(), children: [_jsx("thead", { children: headerGroups.map((headerGroup) => (_jsx("tr", { ...headerGroup.getHeaderGroupProps(), children: headerGroup.headers.map((column) => (_jsx("th", { ...column.getHeaderProps(), style: { width: column.width }, children: column.render("Header") }))) }))) }), _jsx("tbody", { ...getTableBodyProps(), children: rows.map((row) => {
                        prepareRow(row);
                        return (
                        // <button className="tableRow--EntireButton">
                        _jsxs("tr", { ...row.getRowProps(), className: "row", children: [row.cells.map((cell) => (_jsx("td", { ...cell.getCellProps(), children: _jsx("div", { className: "templateTableShimmer-Comment animate" }) }))), row.cells.length < columns.length && _jsx("td", {})] })
                        // </button>
                        );
                    }) })] }) }));
};
export default TemplateTableShimmer;
