import{f as C,g as P,r as k,y,u,c as s,o,d as i,j as b,a as h,t as r,m as g,F as w,k as D,n as N}from"./Cd1nqtmb.js";import{x as B,D as j,O as z,Z as S}from"./BrXQVriU.js";const V={"data-test-id":"s-pagination-select__selected-option",class:"selected-option s-text-regular"},q={key:0,"data-test-id":"s-pagination-select__options",class:"s-pagination-select-options absolute left-0 top-full z-10 w-full"},E={class:"m-0 w-full list-none rounded-[10px] border py-[16px] px-0"},F=["onClick"],A="s-pagination-select-component",T=C({__name:"SPaginationSelect",props:{...B(),currentPage:{type:Number,required:!1,default:1},totalPages:Number},emits:["pageChanged"],setup(n,{emit:m}){const p=n,f=m,l=P({get:()=>p.currentPage,set:e=>e}),t=k(!1),c=()=>{t.value=!1},x=e=>{const a=l.value;l.value=e,c(),f("pageChanged",{previousPage:a,newPage:e})},{themeClasses:v}=j(p,A);return(e,a)=>y((o(),s("div",{"data-test-id":"s-pagination-select__root",class:N(["s-pagination-select-component relative inline-block",[u(v)]])},[i("div",{onClick:a[0]||(a[0]=g(_=>t.value=!t.value,["prevent"])),class:"s-pagination-select-box flex cursor-pointer items-center justify-center rounded-[10px] border py-[16px] px-[24px]"},[i("div",V,r(l.value)+" of "+r(n.totalPages),1),h(S,{name:"icon-chevron-down",class:"ml-[11px]",size:"x-small"})]),t.value?(o(),s("div",q,[i("ul",E,[(o(!0),s(w,null,D(n.totalPages,(_,d)=>(o(),s("li",{"data-test-id":"s-pagination-select__option",class:"s-text-regular cursor-pointer py-[5px] px-[24px]",onClick:g(L=>x(d+1),["prevent"])}," Page "+r(d+1),9,F))),256))])])):b("",!0)],2)),[[u(z),c]])}});export{T as default};

AltStyle によって変換されたページ (->オリジナル) /