"use strict";const i=require("classnames"),t=require("react"),m=require("react-i18next"),o=require("./ArrowIcon-803fe6dd.js"),p=require("./index-99b8957b.js"),h=require("react-router"),u="pagination _pagination_c1488",P={pagination:u},k=({link:n,children:e,className:a})=>t.createElement(p.Link,{className:i(a,"paginationLink"),to:n},e),E=({callBack:n,children:e,className:a})=>t.createElement("a",{href:"#",className:i(a,"paginationLink","link",n?"":"disabled"),onClick:r=>{r.preventDefault(),n&&n()}},e),g=({linkOrCallback:n,children:e,className:a})=>n===!1?null:t.createElement(t.Fragment,null,typeof n=="string"&&t.createElement(k,{link:n,className:a},e),typeof n!="string"&&t.createElement(E,{callBack:n,className:a},e));class f extends t.Component{render(){return t.createElement("div",{className:i(P.pagination,"pagination")},t.createElement(g,{linkOrCallback:this.props.prev,className:"link-prev"},t.createElement(o.ArrowIcon,{className:i(o.ArrowIconStyles.left,"arrowSize")}),t.createElement(m.Trans,{i18nKey:"Pagination.prev"},"Previous")),t.createElement(g,{linkOrCallback:this.props.next,className:"link-next"},t.createElement(m.Trans,{i18nKey:"Pagination.next"},"Next"),t.createElement(o.ArrowIcon,{className:i(o.ArrowIconStyles.right,"arrowSize")})))}}class w{constructor(e){this.link=e}makePath(e,a){const r=h.generatePath(this.link,e),s=new URLSearchParams;for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&s.append(c,String(a[c]));const l=s.toString();return`${r}${l?`?${l}`:""}`}withSearchParams(e){return this.makePath(void 0,e)}is(e,a={}){const{exact:r=!0,strict:s=!1}=a;return p.matchPath(e,{path:this.link,exact:r,strict:s})}}exports.PageRoute=w;exports.Pagination=f;
