import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Card, Collection, Filter, LinkButton, Loader } from "../../components";
import { useCrud } from "../../contexts";
export const ListCrudDocsContentEmpresas = () => {
    const { list, pagination, fetchItems } = useCrud();
    return (_jsxs(Card, { className: "bg-gray-50", title: "Empresas", children: [_jsxs("div", { className: "flex justify-between items-center my-2", children: [_jsx(Collection, { direction: "row", wrap: true, children: _jsx(Filter, { paramName: "filtroEmpresa", label: "Buscar", filterType: "search" }) }), _jsx(Collection, { direction: "row", wrap: true, children: pagination })] }), _jsx(Loader, { isLoading: fetchItems.isLoading, children: _jsx(Collection, { direction: "row", wrap: true, children: list?.map((empresa) => (_jsx(Card, { className: "bg-white w-[100%] md:w-[45%] lg:w-[30%] xl:w-[18%]", title: empresa.nombre, headerActions: _jsx(LinkButton, { to: `/docs/listcrud/empresa/${empresa.id}`, icon: "fa-search", variant: "ghost", size: "sm" }) }, empresa.id))) }) })] }));
};
