import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import "./style.scss";
import React from "react";
import { useTable } from "react-table";
import { CheckboxComponent } from "../..";
const CompanyTableShimmer = ({ numberOfRow = 1, companyTableColums = [], }) => {
    numberOfRow;
    const data = [];
    for (let i = 1; i <= numberOfRow; i++) {
        data.push(i);
    }
    const columns = React.useMemo(() => 
    // [
    //   { Header: "Name", accessor: "name" },
    //   { Header: "Industries", accessor: "industries" },
    //   { Header: "Spectialties", accessor: "specialties" },
    //   { Header: "Employees", accessor: "staffCount" },
    //   { Header: "Location", accessor: "location" },
    // ]
    companyTableColums, []);
    const { getTableProps, getTableBodyProps, headerGroups, rows, prepareRow } = useTable({ columns, data });
    return (_jsx("div", { className: "companyTableShimmer-Generic", children: _jsxs("table", { className: "searchCompanyTableShimmer", ...getTableProps(), children: [_jsx("thead", { children: headerGroups.map((headerGroup) => (_jsx("tr", { ...headerGroup.getHeaderGroupProps(), children: headerGroup.headers.map((column) => (_jsx("th", { ...column.getHeaderProps(), children: column.render("Header") }))) }))) }), _jsx("tbody", { ...getTableBodyProps(), children: rows.map((row) => {
                        prepareRow(row);
                        return (_jsx("tr", { ...row.getRowProps(), children: row.cells.map((cell) => {
                                if (cell.column.Header === "Name") {
                                    return (_jsx("td", { ...cell.getCellProps(), children: _jsxs("span", { className: "companyTableShimmer--NameCell", children: [_jsx(CheckboxComponent, { sizeVariant: "xs", checked: cell.row.original.isSelected, onClick: () => { }, isDisabled: true }), _jsxs("div", { className: "companyTableShimmer-Profile", children: [_jsx("div", { className: "companyTableShimmer-ProfilePic animate" }), _jsx("div", { className: "companyTableShimmer-ProfileName animate" })] })] }) }));
                                }
                                else {
                                    return (_jsx("td", { ...cell.getCellProps(), children: _jsx("div", { className: "companyTableShimmer-Comment animate" }) }));
                                }
                            }) }));
                    }) })] }) }));
};
export default CompanyTableShimmer;
