import{e as P,r as c,h as b,w as v,f as I,B as g,v as N,o as L}from"./iframe-Bl-fVlm8.js";import{P as _}from"./PzSelect-CwWCI-kq.js";import{P as z}from"./PzPagination-Cjg8KFKz.js";import{_ as O}from"./_plugin-vue_export-helper-DlAUqK2U.js";var n=(e=>(e[e.FIVE=5]="FIVE",e[e.TEN=10]="TEN",e[e.TWENTY=20]="TWENTY",e[e.FIFTY=50]="FIFTY",e[e.ONE_HUNDRED=100]="ONE_HUNDRED",e[e.ONE_MILLION=1e6]="ONE_MILLION",e))(n||{});const F=[{label:"5",value:n.FIVE.toString()},{label:"10",value:n.TEN.toString()},{label:"20",value:n.TWENTY.toString()},{label:"50",value:n.FIFTY.toString()},{label:"100",value:n.ONE_HUNDRED.toString()},{label:"Всі",value:n.ONE_MILLION.toString()}],T={class:"pz-list-nav"},i=1,s=P({name:"PzListNav",__name:"PzListNav",props:{selectLabel:{default:"Показати рядків:"},total:{},options:{default:()=>F},perPage:{default:n.TEN},currentPage:{default:i}},emits:["onInput","onChangePerPage"],setup(e,{emit:d}){const a=e,o=d,r=c(a.currentPage),l=c(a.perPage);b(()=>{l.value=a.perPage,u()}),v(()=>a.perPage,()=>l.value=a.perPage),v(()=>a.total,()=>u());const u=()=>{const t=(r.value-i)*l.value,m=t+l.value;o("onInput",[t,m])},p=t=>{r.value=t,u(),o("onChangePerPage")},f=t=>{t!==void 0&&(l.value=Number(t),p(i),o("onChangePerPage"))};return(t,m)=>(L(),I("div",T,[g(N(z),{"model-value":r.value,total:a.total,"per-page":l.value,class:"pz-list-nav__paginate","onUpdate:modelValue":p},null,8,["model-value","total","per-page"]),g(N(_),{name:"pz-list-nav-per-page",variant:"inline",label:a.selectLabel,"model-value":String(l.value),options:a.options,class:"pz-list-nav__select","onUpdate:modelValue":f},null,8,["label","model-value","options"])]))}}),C=O(s,[["__scopeId","data-v-4aa62780"]]);s.__docgenInfo=Object.assign({displayName:s.name??s.__name},{name:"PzListNav",exportName:"default",displayName:"PzListNav",description:"",tags:{},props:[{name:"selectLabel",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'"Показати рядків:"'}},{name:"total",required:!0,type:{name:"number"}},{name:"options",required:!1,type:{name:"Array",elements:[{name:"PzFormSelectOption"}]},defaultValue:{func:!1,value:"() => ITEMS_PAGINATE_PER_PAGE_CONFIG"}},{name:"perPage",required:!1,type:{name:"ITEMS_PER_PAGE"},defaultValue:{func:!1,value:"ITEMS_PER_PAGE.TEN"}},{name:"currentPage",required:!1,type:{name:"number"},defaultValue:{func:!1,value:"DELTA"}}],events:[{name:"onInput",type:{names:["tuple"],elements:[{name:"number"},{name:"number"}]}},{name:"onChangePerPage"}],sourceFiles:["/builds/Web-Projects/client-services/prozorro-ui/src/components/Navigation/PzListNav/PzListNav.vue"]});export{n as I,C as P,F as a};
