import{ab as R,ac as B,bh as N,aT as $,ak as z,z as s,bn as T,bo as w,ao as D,ay as H,ad as E,i,F as _,b2 as J,ae as X,bp as j,b7 as q,af as G,aP as P,l as K,D as O,k as Q}from"./index-B2MTLsCS.js";const Y="/assets/customersAvatar1-CSRSkfsy.png",Z="/assets/customersAvatar2-D2dFp_Pd.png",p="/assets/customersAvatar3-Dk-HX9eJ.png",U=B({name:String,itemAriaLabel:{type:String,default:"$vuetify.rating.ariaLabel.item"},activeColor:String,color:String,clearable:Boolean,disabled:Boolean,emptyIcon:{type:P,default:"$ratingEmpty"},fullIcon:{type:P,default:"$ratingFull"},halfIncrements:Boolean,hover:Boolean,length:{type:[Number,String],default:5},readonly:Boolean,modelValue:{type:[Number,String],default:0},itemLabels:Array,itemLabelPosition:{type:String,default:"top",validator:e=>["top","bottom"].includes(e)},ripple:Boolean,...G(),...q(),...j(),...X(),...J()},"VRating"),ee=R()({name:"VRating",props:U(),emits:{"update:modelValue":e=>!0},setup(e,A){let{slots:r}=A;const{t:f}=N(),{themeClasses:C}=$(e),h=z(e,"modelValue"),c=s(()=>T(parseFloat(h.value),0,Number(e.length))),y=s(()=>w(Number(e.length),1)),I=s(()=>y.value.flatMap(a=>e.halfIncrements?[a-.5,a]:[a])),d=D(-1),g=s(()=>I.value.map(a=>{const t=e.hover&&d.value>-1,n=c.value>=a,l=d.value>=a,o=(t?l:n)?e.fullIcon:e.emptyIcon,b=e.activeColor??e.color,v=n||l?b:e.color;return{isFilled:n,isHovered:l,icon:o,color:v}})),M=s(()=>[0,...I.value].map(a=>{function t(){d.value=a}function n(){d.value=-1}function l(){e.disabled||e.readonly||(h.value=c.value===a&&e.clearable?0:a)}return{onMouseenter:e.hover?t:void 0,onMouseleave:e.hover?n:void 0,onClick:l}})),F=H(),S=s(()=>e.name??`v-rating-${F}`);function m(a){var V,x;let{value:t,index:n,showStar:l=!0}=a;const{onMouseenter:u,onMouseleave:o,onClick:b}=M.value[n+1],v=`${S.value}-${String(t).replace(".","-")}`,L={color:(V=g.value[n])==null?void 0:V.color,density:e.density,disabled:e.disabled,icon:(x=g.value[n])==null?void 0:x.icon,ripple:e.ripple,size:e.size,variant:"plain"};return i(_,null,[i("label",{for:v,class:{"v-rating__item--half":e.halfIncrements&&t%1>0,"v-rating__item--full":e.halfIncrements&&t%1===0},onMouseenter:u,onMouseleave:o,onClick:b},[i("span",{class:"v-rating__hidden"},[f(e.itemAriaLabel,t,e.length)]),l?r.item?r.item({...g.value[n],props:L,value:t,index:n,rating:c.value}):i(K,O({"aria-label":f(e.itemAriaLabel,t,e.length)},L),null):void 0]),i("input",{class:"v-rating__hidden",name:S.value,id:v,type:"radio",value:t,checked:c.value===t,tabindex:-1,readonly:e.readonly,disabled:e.disabled},null)])}function k(a){return r["item-label"]?r["item-label"](a):a.label?i("span",null,[a.label]):i("span",null,[Q(" ")])}return E(()=>{var t;const a=!!((t=e.itemLabels)!=null&&t.length)||r["item-label"];return i(e.tag,{class:["v-rating",{"v-rating--hover":e.hover,"v-rating--readonly":e.readonly},C.value,e.class],style:e.style},{default:()=>[i(m,{value:0,index:-1,showStar:!1},null),y.value.map((n,l)=>{var u,o;return i("div",{class:"v-rating__wrapper"},[a&&e.itemLabelPosition==="top"?k({value:n,index:l,label:(u=e.itemLabels)==null?void 0:u[l]}):void 0,i("div",{class:"v-rating__item"},[e.halfIncrements?i(_,null,[i(m,{value:n-.5,index:l*2},null),i(m,{value:n,index:l*2+1},null)]):i(m,{value:n,index:l},null)]),a&&e.itemLabelPosition==="bottom"?k({value:n,index:l,label:(o=e.itemLabels)==null?void 0:o[l]}):void 0])})]})}),{}}});export{ee as V,Z as a,Y as b,p as c};