import { cx as e } from "../../../theme/tools.js";
import { Spinner as t } from "../../atoms/spinner/Spinner.js";
import { resolveBackofficeListFooterLabels as n, resolveBackofficeListFooterPageInfoState as r, resolveBackofficeListFooterStatusLabel as i } from "./BackofficeListFooter.helpers.js";
import { button as a, container as o, progress as s, statusGroup as c } from "./backofficeListFooter.css.js";
import { jsx as l, jsxs as u } from "react/jsx-runtime";
//#region src/backoffice/molecules/backoffice_list_footer/BackofficeListFooter.tsx
var d = ({ className: d, hasNextPage: f, isLoading: p, labels: m, loadedCount: h, mode: g, onLoadMore: _, pageInfoState: v, totalCount: y }) => {
	let b = r({
		hasNextPage: f,
		isLoading: p,
		pageInfoState: v
	}), x = n({
		labels: m,
		loadedCount: h,
		totalCount: y
	}), S = i({
		labels: x,
		mode: g,
		pageInfoState: b
	}), C = null;
	return g === "button" && f && !p && _ != null && (C = /* @__PURE__ */ l("button", {
		type: "button",
		className: a,
		onClick: _,
		children: x.loadMore
	})), /* @__PURE__ */ u("div", {
		className: e(o, d),
		children: [/* @__PURE__ */ l("div", {
			className: c,
			role: "status",
			"aria-live": "polite",
			"aria-atomic": "true",
			children: x.loaded != null && /* @__PURE__ */ l("span", {
				className: "_6wqadl4 qbwcueq txvbqbv7x txvbqbwr6 txvbqb18ef txvbqb1avz _6wqadl3 txvbqb9j txvbqb1bg3",
				children: x.loaded
			})
		}), /* @__PURE__ */ u("div", {
			className: s,
			"aria-live": "polite",
			"aria-atomic": "true",
			children: [
				p && /* @__PURE__ */ l(t, { size: 16 }),
				S != null && /* @__PURE__ */ l("span", {
					className: "_6wqadl5 txvbqb9j txvbqb1bg5",
					children: S
				}),
				C
			]
		})]
	});
};
//#endregion
export { d as BackofficeListFooter, d as default };

//# sourceMappingURL=BackofficeListFooter.js.map