import{aa as c,n as d,ac as h}from"./index.02c939b6.js";import{d as f,c as b,o as r,i as u,F as x,t as g}from"./index.9838a17e.js";const _={class:"relative z-0 inline-flex rounded-md shadow-sm"},y=["onClick"],C=f({__name:"InputWeight",props:{min:{type:[String,Number],default:"1"},max:{type:[String,Number],default:"10"},modelValue:{type:[String,Number],default:""}},emits:["update:modelValue"],setup(l,{emit:i}){const s=l,a=b(()=>{const t=[],n=+s.min,e=+s.max;for(let o=n;o<=e;o++)t.push(o);return t}),m=(t,n)=>{const e=["relative","inline-flex","items-center","border","px-3","py-input-y","text-input-size","focus:z-10","focus:outline-none","focus:border-primary"];return n==0?e.push("rounded-l-input"):n==a.value.length-1&&e.push("rounded-r-input"),n!=0&&e.push("-ml-px"),s.modelValue===t?e.push("bg-theme-400 border-theme-600 text-theme-0 z-20"):e.push("bg-theme-100 text-theme-700 border-theme-300 hover:bg-theme-200 hover:border-theme-400 hover:z-20"),e.join(" ")},p=t=>{i("update:modelValue",t)};return(t,n)=>(r(),u("span",_,[(r(!0),u(x,null,g(c(a),(e,o)=>(r(),u("button",{key:o,type:"button",class:d(m(e,o)),onClick:v=>p(e)},h(e),11,y))),128))]))}});export{C as default};
