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 ProfileTableShimmer = ({ numberOfRow = 1, profileTableColums = [], }) => {
    numberOfRow;
    const data = [];
    for (let i = 1; i <= numberOfRow; i++) {
        data.push(i);
    }
    const columns = React.useMemo(() => 
    // [
    //   { Header: "Name", accessor: "fullName" },
    //   { Header: "Title", accessor: "currentTitle" },
    //   { Header: "Company", accessor: "currentCompany" },
    //   { Header: "Location", accessor: "location" },
    //   { Header: "Industry", accessor: "industry" },
    //   { Header: "Skills", accessor: "skills" },
    //   { Header: "Last Updated", accessor: "lastUpdated" },
    // ]
    profileTableColums, []);
    const { getTableProps, getTableBodyProps, headerGroups, rows, prepareRow } = useTable({ columns, data });
    return (_jsx("div", { className: "profileTableShimmer-Generic", children: _jsxs("table", { className: "searchPersonTableShimmer", ...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: "profileTableShimmer--NameCell", children: [_jsx(CheckboxComponent, { sizeVariant: "xs", checked: cell.row.original.isSelected, onClick: () => { }, isDisabled: true }), _jsxs("div", { className: "profileTableShimmer-Profile", children: [_jsx("div", { className: "profileTableShimmer-ProfilePic animate" }), _jsx("div", { className: "profileTableShimmer-ProfileName animate" })] })] }) }));
                                }
                                else {
                                    return (_jsx("td", { ...cell.getCellProps(), children: _jsx("div", { className: "profileTableShimmer-Comment animate" }) }));
                                }
                            }) }));
                    }) })] }) }));
};
export default ProfileTableShimmer;
