"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const Dropdown_1 = require("../Dropdown");
const react_1 = tslib_1.__importDefault(require("react"));
const optionNumber = [150, 125, 100, 75, 50, 25, 10];
function PaginationSelected({ rowQuantity, setIsChangeRowQty, setRowQuantity, routerPush, searchParams, tableKey, setCurrentPage, setPagi, paginationData, }) {
    const options = optionNumber.map((item) => ({
        content: item + '',
        active: rowQuantity === item,
        onClick: () => {
            setRowQuantity(item);
            setIsChangeRowQty(true);
            const params = new URLSearchParams(searchParams + '');
            params.set(`row-${tableKey}`, item + '');
            params.set(`pagi-${tableKey}`, '1');
            setCurrentPage(1);
            setPagi(0);
            paginationData(0);
            routerPush(`?${params + ''}`);
        },
    }));
    return (react_1.default.createElement("div", { className: 'relative' },
        react_1.default.createElement("div", { className: 'absolute bottom-0 top-0 flex items-center gap-x-1' },
            react_1.default.createElement(Dropdown_1.PHXDropdown, { buttonContent: `${rowQuantity}`, options: options, origin: 'top-left', type: 'default' }),
            react_1.default.createElement("div", { className: 'w-24 text-xs' }, "b\u1EA3n ghi/trang"))));
}
exports.default = PaginationSelected;
//# sourceMappingURL=PaginaitonSelected.js.map