import e from"../_util/vue-types/index.mjs";import{computed as t,createVNode as n,defineComponent as r}from"vue";var i={value:Number,index:Number,prefixCls:String,allowHalf:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},character:e.any,characterRender:Function,focused:{type:Boolean,default:void 0},count:Number,onClick:Function,onHover:Function},a=r({compatConfig:{MODE:3},name:`Star`,inheritAttrs:!1,props:i,emits:[`hover`,`click`],setup(e,{emit:r}){let i=t=>{let{index:n}=e;r(`hover`,t,n)},a=t=>{let{index:n}=e;r(`click`,t,n)},o=t=>{let{index:n}=e;t.keyCode===13&&r(`click`,t,n)},s=t(()=>{let{prefixCls:t,index:n,value:r,allowHalf:i,focused:a}=e,o=n+1,s=t;return r===0&&n===0&&a?s+=` ${t}-focused`:i&&r+.5>=o&&r<o?(s+=` ${t}-half ${t}-active`,a&&(s+=` ${t}-focused`)):(s+=o<=r?` ${t}-full`:` ${t}-zero`,o===r&&a&&(s+=` ${t}-focused`)),s});return()=>{let{disabled:t,prefixCls:r,characterRender:c,character:l,index:u,count:d,value:f}=e,p=typeof l==`function`?l({disabled:t,prefixCls:r,index:u,count:d,value:f}):l,m=n(`li`,{class:s.value},[n(`div`,{onClick:t?null:a,onKeydown:t?null:o,onMousemove:t?null:i,role:`radio`,"aria-checked":f>u?`true`:`false`,"aria-posinset":u+1,"aria-setsize":d,tabindex:t?-1:0},[n(`div`,{class:`${r}-first`},[p]),n(`div`,{class:`${r}-second`},[p])])]);return c&&(m=c(m,e)),m}}});export{a as default,i as starProps};