{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/hSlWGXkEqrXD8FSvtZxH/lU4eIcBXrnVrEJ8W7qdK/rating.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function StarRating(props){const{rating,starColor,filledColor,starSize,textSize,textWeight,textColor,style}=props;// Ensure all whole numbers are displayed with .0\nconst formattedRating=Number.isInteger(rating)?`${rating}.0`:rating.toFixed(1);const renderStar=index=>{if(rating>=index+1){// Full star\nreturn /*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:filledColor,width:`${starSize}px`,height:`${starSize}px`,children:/*#__PURE__*/_jsx(\"path\",{d:\"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z\"})},index);}else if(rating>index&&rating<index+1){// Half-filled star\nreturn /*#__PURE__*/_jsxs(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",width:`${starSize}px`,height:`${starSize}px`,children:[/*#__PURE__*/_jsx(\"defs\",{children:/*#__PURE__*/_jsxs(\"linearGradient\",{id:`half-fill-${index}`,children:[/*#__PURE__*/_jsx(\"stop\",{offset:\"50%\",stopColor:filledColor}),/*#__PURE__*/_jsx(\"stop\",{offset:\"50%\",stopColor:starColor})]})}),/*#__PURE__*/_jsx(\"path\",{fill:`url(#half-fill-${index})`,d:\"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z\"})]},index);}else{// Empty star\nreturn /*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:starColor,width:`${starSize}px`,height:`${starSize}px`,children:/*#__PURE__*/_jsx(\"path\",{d:\"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z\"})},index);}};return /*#__PURE__*/_jsxs(\"div\",{style:{...style,display:\"flex\",alignItems:\"center\",gap:\"8px\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{fontSize:`${textSize}px`,fontWeight:textWeight,color:textColor},children:formattedRating}),/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",gap:\"4px\"},children:Array.from({length:5},(_,index)=>renderStar(index))})]});}StarRating.displayName=\"Star Rating\";// Add property controls for customizing the component in Framer\naddPropertyControls(StarRating,{rating:{type:ControlType.Number,defaultValue:3,min:0,max:5,step:.1,displayStepper:true,title:\"Rating\"},starColor:{type:ControlType.Color,defaultValue:\"#d3d3d3\",title:\"Star Color\"},filledColor:{type:ControlType.Color,defaultValue:\"#FFD700\",title:\"Filled Color\"},starSize:{type:ControlType.Number,defaultValue:24,min:12,max:64,step:1,unit:\"px\",title:\"Star Size\"},textSize:{type:ControlType.Number,defaultValue:16,min:10,max:64,step:1,unit:\"px\",title:\"Text Size\"},textWeight:{type:ControlType.Number,defaultValue:400,min:100,max:900,step:100,title:\"Text Weight\"},textColor:{type:ControlType.Color,defaultValue:\"#000000\",title:\"Text Color\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StarRating\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./rating.map"],
  "mappings": "gGAGkB,SAARA,EAA4BC,EAAM,CAAC,GAAK,CAAC,OAAAC,EAAO,UAAAC,EAAU,YAAAC,EAAY,SAAAC,EAAS,SAAAC,EAAS,WAAAC,EAAW,UAAAC,EAAU,MAAAC,CAAK,EAAER,EACxHS,EAAgB,OAAO,UAAUR,CAAM,E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AK,CAAC,OAAO,CAAC,EAAE,CAACE,EAAEH,IAAQD,EAAWC,CAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAACZ,EAAW,YAAY,cACxpBgB,EAAoBhB,EAAW,CAAC,OAAO,CAAC,KAAKiB,EAAY,OAAO,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,GAAG,eAAe,GAAK,MAAM,QAAQ,EAAE,UAAU,CAAC,KAAKA,EAAY,MAAM,aAAa,UAAU,MAAM,YAAY,EAAE,YAAY,CAAC,KAAKA,EAAY,MAAM,aAAa,UAAU,MAAM,cAAc,EAAE,SAAS,CAAC,KAAKA,EAAY,OAAO,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,EAAE,KAAK,KAAK,MAAM,WAAW,EAAE,SAAS,CAAC,KAAKA,EAAY,OAAO,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,EAAE,KAAK,KAAK,MAAM,WAAW,EAAE,WAAW,CAAC,KAAKA,EAAY,OAAO,aAAa,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK,IAAI,MAAM,aAAa,EAAE,UAAU,CAAC,KAAKA,EAAY,MAAM,aAAa,UAAU,MAAM,YAAY,CAAC,CAAC",
  "names": ["StarRating", "props", "rating", "starColor", "filledColor", "starSize", "textSize", "textWeight", "textColor", "style", "formattedRating", "renderStar", "index", "p", "u", "_", "addPropertyControls", "ControlType"]
}
