import { DataList } from "../data-table/DataList.js";
import { c } from "react/compiler-runtime";
import React, { useCallback } from "react";
import { jsx } from "react/jsx-runtime";
var CustomListView_default = (a) => {
	let o = c(45), { loading: s, error: l, items: u, totalItems: d, filterConfig: f, onClick: p, handleNew: m, setPage: h, setRowsPerPage: g, setSearchTerm: _, setFilters: v, searchTerm: y, filters: b, page: x, rowsPerPage: S, batchActions: C, batchDelete: w, enableBatchActions: T, rowActions: E, itemRenderer: D, newButtonLabel: O } = a, k = y === void 0 ? "" : y, A;
	o[0] === C ? A = o[1] : (A = C === void 0 ? [] : C, o[0] = C, o[1] = A);
	let j = A, M = T === void 0 ? !0 : T, N;
	o[2] === E ? N = o[3] : (N = E === void 0 ? [] : E, o[2] = E, o[3] = N);
	let P = N, F;
	o[4] === j ? F = o[5] : (F = j.map(_temp), o[4] = j, o[5] = F);
	let I = F, L;
	o[6] === P ? L = o[7] : (L = P.map(_temp2), o[6] = P, o[7] = L);
	let R = L, z;
	o[8] === h ? z = o[9] : (z = (e) => {
		h(e);
	}, o[8] = h, o[9] = z);
	let B = z, V;
	o[10] !== h || o[11] !== g ? (V = (e) => {
		g(e), h(0);
	}, o[10] = h, o[11] = g, o[12] = V) : V = o[12];
	let H = V, U;
	o[13] !== h || o[14] !== _ ? (U = (e) => {
		_?.(e), h(0);
	}, o[13] = h, o[14] = _, o[15] = U) : U = o[15];
	let W = U, G;
	o[16] !== v || o[17] !== h ? (G = (e) => {
		v?.(e), h(0);
	}, o[16] = v, o[17] = h, o[18] = G) : G = o[18];
	let K = G, q;
	o[19] === p ? q = o[20] : (q = (e) => {
		p(e.id);
	}, o[19] = p, o[20] = q);
	let J = q, Y;
	o[21] === w ? Y = o[22] : (Y = async (e) => {
		w && await w(e);
	}, o[21] = w, o[22] = Y);
	let X = Y, Z = _ ? W : void 0, Q = v ? K : void 0, $;
	return o[23] !== M || o[24] !== l || o[25] !== f || o[26] !== b || o[27] !== X || o[28] !== m || o[29] !== B || o[30] !== H || o[31] !== J || o[32] !== D || o[33] !== u || o[34] !== s || o[35] !== O || o[36] !== x || o[37] !== S || o[38] !== k || o[39] !== Z || o[40] !== Q || o[41] !== d || o[42] !== I || o[43] !== R ? ($ = /* @__PURE__ */ jsx("div", {
		className: "w-full",
		children: /* @__PURE__ */ jsx(DataList, {
			data: u,
			totalItems: d,
			loading: s,
			error: l,
			page: x,
			pageSize: S,
			onPageChange: B,
			onPageSizeChange: H,
			searchTerm: k,
			onSearchChange: Z,
			filters: b,
			filterConfig: f,
			onFiltersChange: Q,
			onRowClick: J,
			onNew: m,
			enableBatchActions: M,
			batchActions: I,
			onBatchDelete: X,
			rowActions: R,
			itemRenderer: D,
			newButtonLabel: O
		})
	}), o[23] = M, o[24] = l, o[25] = f, o[26] = b, o[27] = X, o[28] = m, o[29] = B, o[30] = H, o[31] = J, o[32] = D, o[33] = u, o[34] = s, o[35] = O, o[36] = x, o[37] = S, o[38] = k, o[39] = Z, o[40] = Q, o[41] = d, o[42] = I, o[43] = R, o[44] = $) : $ = o[44], $;
};
function _temp(e) {
	return {
		id: e.id,
		label: e.label,
		icon: e.icon,
		variant: e.variant,
		action: e.action
	};
}
function _temp2(e) {
	return {
		id: e.id,
		label: e.label,
		icon: e.icon,
		variant: e.variant,
		action: e.action,
		condition: e.condition,
		disabled: e.disabled,
		className: e.className
	};
}
export { CustomListView_default as default };
