1import{_ as u,a as s,d as r,w as l,b as c,F as g,e as _,o,n as h,t as f}from"./_plugin-vue_export-helper-BsRPLdpQ.js";const p={name:"pagination",props:["entity"],data:function(){return{}},computed:{pages(){this.offset=5;let t=[],e=this.entity.current_page-Math.floor(this.offset/2);e<1&&(e=1);let n=e+this.offset-1;for(n>this.entity.last_page&&(n=this.entity.last_page);e<=n;)t.push(e),e++;return t}},methods:{isCurrentPage:function(t){return this.entity.current_page==t},hasNextPages:function(){return this.entity.next_page_url!==null},hasPrevPages:function(){return this.entity.prev_page_url!==null},navigateTo:function(t){this.scrollBackToTop(),this.$parent.page=t},scrollBackToTop:function(){new scroll_to_element().scrollToElement(".js-scroll-top")}}},d={key:0,class:"row align-center u-margin-vertical-large","data-section":"pagination"},m={class:"column small-12 medium-10"},v={class:"c-pagination c-list-inline c-list-unstyled text-center"},y={key:0,class:"c-pagination-item c-list-item"},k=["onClick"],P={href:"#"},T={key:1,class:"c-pagination-item c-list-item"};function x(t,e,n,C,w,i){return n.entity?(o(),s("div",d,[r("div",m,[r("ul",v,[i.hasPrevPages()?(o(),s("li",y,[r("a",{href:"#",class:"c-icon icon-arrow-left",onClick:e[0]||(e[0]=l(a=>i.navigateTo(n.entity.current_page-1),["prevent"])),rel:"prev"})])):c("",!0),(o(!0),s(g,null,_(i.pages,a=>(o(),s("li",{class:h(["c-pagination-item c-list-item",{disabled:i.isCurrentPage(a)}]),onClick:l(B=>i.navigateTo(a),["prevent"])},[r("a",P,f(a),1)],10,k))),256)),i.hasNextPages()?(o(),s("li",T,[r("a",{href:"#",class:"c-icon icon-arrow-right",onClick:e[1]||(e[1]=l(a=>i.navigateTo(n.entity.current_page+1),["prevent"])),rel:"next"})])):c("",!0)])])])):c("",!0)}const b=u(p,[["render",x],["__file","pagination.vue"]]);export{b as P};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.