import { jsx as _jsx } from "react/jsx-runtime";
import { PaginationItem } from './PaginationItem';
import { PaginationList } from './styles';
import { useLogic } from './useLogic';
export const Pagination = (props) => {
    const { onItemClick, items, restProps } = useLogic(props);
    return (_jsx("nav", { ...restProps, children: _jsx(PaginationList, { children: items.map(({ page: pageNumber, type, selected, disabled, onClick }, index) => {
                return (
                // biome-ignore lint/suspicious/noArrayIndexKey: key=index необходим для корректной работы компонента
                _jsx("li", { children: _jsx(PaginationItem, { pageNumber: pageNumber, type: type, selected: selected, disabled: disabled, onClick: onClick, onItemClick: onItemClick, restPropsDisabled: restProps.disabled }) }, index));
            }) }) }));
};
