import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["items","getItemLabel","getItemRef","getItemAs","getItemKey","getItemAttributes","getItemClickable","getItemOnClick","onItemClick","value","size","form","className"];import"./PaginationList.css";import React,{forwardRef}from"react";import{cnMixFlex}from"../../../mixs/MixFlex";import{cn}from"../../../utils/bem";import{defaultGetItemLabel}from"../helpers";import{PaginationItem}from"../PaginationItem";import{paginationPropFormDefault,paginationPropSizeDefault}from"../types";var cnPaginationList=cn("PaginationList"),PaginationListRender=function(a,b){var c=a.items,d=a.getItemLabel,e=void 0===d?defaultGetItemLabel:d,f=a.getItemRef,g=a.getItemAs,h=a.getItemKey,i=a.getItemAttributes,j=a.getItemClickable,k=a.getItemOnClick,l=a.onItemClick,m=a.value,n=a.size,o=void 0===n?paginationPropSizeDefault:n,p=a.form,q=void 0===p?paginationPropFormDefault:p,r=a.className,s=_objectWithoutProperties(a,_excluded),t=function(a){var b,c=null!==(b=null===i||void 0===i?void 0:i(a))&&void 0!==b?b:{},d=!!m&&(null===h||void 0===h?void 0:h(a))===(null===h||void 0===h?void 0:h(m));return React.createElement(PaginationItem,Object.assign({},c,{form:q,size:o,onClick:function handleClick(b){var c;null===k||void 0===k||null===(c=k(a))||void 0===c?void 0:c(b),null===l||void 0===l?void 0:l(a,{e:b})},label:e(a),active:d,ref:null===f||void 0===f?void 0:f(a),as:null!==j&&void 0!==j&&j(a)?"div":null===g||void 0===g?void 0:g(a)}))};return React.createElement("div",Object.assign({ref:b,className:cnPaginationList(null,[r,cnMixFlex({gap:"3xs",wrap:"nowrap"})])},s),c.map(function(a){return React.createElement(React.Fragment,{key:cnPaginationList("Item",{key:h(a)})},t(a))}))};export var PaginationList=forwardRef(PaginationListRender);
//# sourceMappingURL=PaginationList.js.map