import{z as u,o as n,c as i,a as r,F as L,k as h,n as g,t as _,i as w}from"./index-Cdt4oMy6.js";const c="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.33984%2012.0003L18.0165%2023.5728L18.9854%2022.4277L6.66203%2012.0003L12.4854%207.07281L11.5165%205.92773L4.33984%2012.0003Z'%20fill='%23D0DBEB'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M18.0155%200.427186L13.1405%204.55219L14.1094%205.69727L18.9844%201.57227L18.0155%200.427186Z'%20fill='%23D0DBEB'/%3e%3c/svg%3e",p="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.33984%2012.0003L18.0165%2023.5728L18.9854%2022.4277L6.66203%2012.0003L12.4854%207.07281L11.5165%205.92773L4.33984%2012.0003Z'%20fill='%23314157'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M18.0155%200.427186L13.1405%204.55219L14.1094%205.69727L18.9844%201.57227L18.0155%200.427186Z'%20fill='%23017338'/%3e%3c/svg%3e",f={key:0,src:c,alt:""},k={key:1,src:p,alt:""},C=["onClick"],y={key:0,src:c,alt:""},B={key:1,src:p,alt:""},M={__name:"AppPagination",props:{pagination:{type:Object,required:!0},center:{type:Boolean}},emits:["onChangePage"],setup(a,{emit:d}){const m=d,e=a,v=u(()=>Array.from({length:e.pagination.pageCount},(t,o)=>o+1)),s=t=>{t!==e.pagination.page&&t!==0&&t!==e.pagination.pageCount+1&&m("onChangePage",t)};return(t,o)=>e.pagination.pageCount>1?(n(),i("div",{key:0,class:g(["pagination",{center:e.center}])},[r("div",{class:"pagination__item-arrow pagination__item-arrow--prev",onClick:o[0]||(o[0]=l=>s(e.pagination.page-1))},[a.pagination.page===1?(n(),i("img",f)):(n(),i("img",k))]),(n(!0),i(L,null,h(v.value,l=>(n(),i("div",{class:g(["pagination__item-page",{active:l===a.pagination.page}]),key:l,onClick:x=>s(l)},_(l),11,C))),128)),r("div",{class:g(["pagination__item-arrow pagination__item-arrow--next",{active:t.page===a.pagination.page}]),onClick:o[1]||(o[1]=l=>s(e.pagination.page+1))},[a.pagination.page===a.pagination.pageCount?(n(),i("img",y)):(n(),i("img",B))],2)],2)):w("",!0)}};export{M as _};