{"version":3,"file":"StarRating.Bw4VG37d.mjs","names":["_Fragment"],"sources":["https:/framerusercontent.com/modules/yqwMLYy6XgN2qrHeyW6S/gdaMyEAS5JEBZGsJm6iq/StarRating.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";function Star({filled,color}){let d;if(filled>=1){// Estrella llena\nd=/*#__PURE__*/_jsx(\"path\",{d:\"M12 .587l3.668 7.568L24 9.748l-6 5.861 1.416 8.253L12 19.771l-7.416 4.091L6 15.609 0 9.748l8.332-1.593z\",fill:color});}else if(filled>0){// Media estrella\nd=/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"defs\",{children:/*#__PURE__*/_jsxs(\"linearGradient\",{id:\"half\",children:[/*#__PURE__*/_jsx(\"stop\",{offset:\"50%\",stopColor:color}),/*#__PURE__*/_jsx(\"stop\",{offset:\"50%\",stopColor:\"lightgray\"})]})}),/*#__PURE__*/_jsx(\"path\",{d:\"M12 .587l3.668 7.568L24 9.748l-6 5.861 1.416 8.253L12 19.771l-7.416 4.091L6 15.609 0 9.748l8.332-1.593z\",fill:\"url(#half)\"})]});}else{// Estrella vacía\nd=/*#__PURE__*/_jsx(\"path\",{d:\"M12 .587l3.668 7.568L24 9.748l-6 5.861 1.416 8.253L12 19.771l-7.416 4.091L6 15.609 0 9.748l8.332-1.593z\",fill:\"lightgray\"});}return /*#__PURE__*/_jsx(\"svg\",{width:24,height:24,viewBox:\"0 0 24 24\",children:d});}export function StarRating(props){const{color,rating}=props;const stars=[];for(let i=0;i<5;i++){const filled=Math.min(1,Math.max(0,rating-i));stars.push(/*#__PURE__*/_jsx(Star,{filled:filled,color:color},i));}return /*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",gap:\"4px\"},children:stars});}addPropertyControls(StarRating,{rating:{type:ControlType.Number,title:\"Estrellas\",min:0,max:5,step:.1,defaultValue:4.5},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#FFD700\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"StarRating\":{\"type\":\"reactComponent\",\"name\":\"StarRating\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StarRating.map"],"mappings":"0KAAmI,SAAS,EAAK,CAAC,SAAO,SAAO,CAAC,IAAI,EAGT,MAHW,CAGvK,EAH0K,GAAQ,EACnK,EAAK,OAAO,CAAC,EAAE,0GAA0G,KAAK,EAAM,CAAC,CAAU,EAAO,EACtJ,EAAMA,EAAU,CAAC,SAAS,CAAc,EAAK,OAAO,CAAC,SAAsB,EAAM,iBAAiB,CAAC,GAAG,OAAO,SAAS,CAAc,EAAK,OAAO,CAAC,OAAO,MAAM,UAAU,EAAM,CAAC,CAAc,EAAK,OAAO,CAAC,OAAO,MAAM,UAAU,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAc,EAAK,OAAO,CAAC,EAAE,0GAA0G,KAAK,aAAa,CAAC,CAAC,CAAC,CAAC,CAChZ,EAAK,OAAO,CAAC,EAAE,0GAA0G,KAAK,YAAY,CAAC,CAAsB,EAAK,MAAM,CAAC,MAAM,GAAG,OAAO,GAAG,QAAQ,YAAY,SAAS,EAAE,CAAC,CAAE,SAAgB,EAAW,EAAM,CAAC,GAAK,CAAC,QAAM,UAAQ,EAAY,EAAM,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,IAAM,EAAO,KAAK,IAAI,EAAE,KAAK,IAAI,EAAE,EAAO,EAAE,CAAC,CAAC,EAAM,KAAkB,EAAK,EAAK,CAAQ,SAAa,QAAM,CAAC,EAAE,CAAC,CAAE,OAAoB,EAAK,MAAM,CAAC,MAAM,CAAC,QAAQ,OAAO,IAAI,MAAM,CAAC,SAAS,EAAM,CAAC,kBAHpc,IAAoD,CAGkZ,EAAoB,EAAW,CAAC,OAAO,CAAC,KAAK,EAAY,OAAO,MAAM,YAAY,IAAI,EAAE,IAAI,EAAE,KAAK,GAAG,aAAa,IAAI,CAAC,MAAM,CAAC,KAAK,EAAY,MAAM,MAAM,QAAQ,aAAa,UAAU,CAAC,CAAC"}