{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/bjUTEQt5uFu8cIOVtWXD/CvR35MeeJnSdIYAAt4ht/FramerIcon.js", "ssg:https://framerusercontent.com/modules/7yynCXv9TpojrJCd2Iwh/BpqmGeL7HaN9d5iKx9Xh/Zakat_Calc_btn.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";const DEFAULT_COLOR=\"#1570EF\";const DEFAULT_SVG=`<svg viewBox=\"0 0 22 22\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"m13.076 12.21 3.098 3.098a1.25 1.25 0 0 0 1.768 0l3.424-3.424a1.25 1.25 0 0 0 0-1.768l-3.424-3.424a1.25 1.25 0 0 0-1.768 0L13.076 9.79l4.902.903c.341.063.341.552 0 .614l-4.902.903Zm-3.206.786-3.178 3.178a1.25 1.25 0 0 0 0 1.768l3.424 3.424a1.25 1.25 0 0 0 1.768 0l3.424-3.424a1.25 1.25 0 0 0 0-1.768l-3.043-3.043-.878 4.768c-.063.34-.552.34-.615 0l-.902-4.903ZM6.692 4.058a1.25 1.25 0 0 0 0 1.768l3.177 3.178.903-4.903c.063-.34.552-.34.615 0l.878 4.768 3.043-3.043a1.25 1.25 0 0 0 0-1.768L11.884.634a1.25 1.25 0 0 0-1.768 0L6.692 4.058ZM.634 10.116a1.25 1.25 0 0 0 0 1.768l3.424 3.424a1.25 1.25 0 0 0 1.768 0l3.123-3.122-4.768-.879c-.341-.063-.341-.552 0-.614l4.768-.879-3.123-3.122a1.25 1.25 0 0 0-1.768 0L.634 10.116Z\" fill=\"#1570EF\"/></svg>`;const DEFAULT_STROKE_WIDTH=1.5;/*\n * @framerDisableUnlink\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n *\n * @framerIntrinsicHeight 24\n * @framerIntrinsicWidth 24\n */export default function FramerIcons(props){const customizedSvg=getCustomizedSVG(props.svg,props.color,props.strokeWidth);return /*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",maxWidth:\"100%\",maxHeight:\"100%\",alignItems:\"center\",justifyContent:\"center\",...props.style},dangerouslySetInnerHTML:{__html:customizedSvg}});}addPropertyControls(FramerIcons,{svg:{title:\"SVG\",type:ControlType.String,defaultValue:DEFAULT_SVG},strokeWidth:{type:ControlType.Number,step:.25,min:.5,max:2,defaultValue:DEFAULT_STROKE_WIDTH,hidden:props=>hideStrokeWidth(props.svg)},color:{type:ControlType.Color,defaultValue:DEFAULT_COLOR,description:\"By [FramerIcons](https://www.framericons.com?utm=FramerIconComponent)\"}});// hide if no stroke-width or all stroke-widths are 0\nfunction hideStrokeWidth(svg){const strokeWidthMatch=svg.match(/stroke-width=\"([^\"]+)\"/g);return!strokeWidthMatch||strokeWidthMatch.every(match=>match===\"0\");}function getCustomizedSVG(svg,color=DEFAULT_COLOR,strokeWidth=DEFAULT_STROKE_WIDTH){let svgAttributes=svg.match(/<svg[^>]*>/)?.[0];if(!svgAttributes){svg=DEFAULT_SVG;svgAttributes=svg.match(/<svg[^>]*>/)?.[0];}const width=svgAttributes.match(/width=\"([^\"]*)\"/)?.[1];const height=svgAttributes.match(/height=\"([^\"]*)\"/)?.[1];const viewBox=svgAttributes.match(/viewBox=\"([^\"]*)\"/)?.[1]?.split(\" \");const viewBoxWidth=viewBox?.[2];const viewBoxHeight=viewBox?.[3];if(width&&height){svg=svg.replace(/width=\"([^\"]*)\"/,`width=\"100%\"`);svg=svg.replace(/height=\"([^\"]*)\"/,`height=\"100%\"`);}else{svg=svg.replace(/<svg/,`<svg width=\"100%\" height=\"100%\"`);}let hasElementsWithValidColors=false;if(svg.includes('fill=\"')||svg.includes('stroke=\"')){svg=svg.replace(/(fill|stroke)=\"([^\"]+)\"/g,(match,attr,value)=>{if(value===\"none\"||value===\"transparent\"){return match;}// For iconsax -> Crypto -> Bulk\nif(value===\"white\"){return\"\";}hasElementsWithValidColors=true;return`${attr}=\"${color}\"`;});}if(!hasElementsWithValidColors){svg=svg.replace(/<(path|circle|rect|line|polygon|polyline) /g,match=>`<${match.slice(1)} fill=\"${color}\" `);}svg=svg.replace(/stroke-width=\"([^\"]+)\"/g,(match,value)=>{if(value===\"0\"){return match;}return`stroke-width=\"${strokeWidth}\"`;});return svg;}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FramerIcons\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicWidth\":\"24\",\"framerDisableUnlink\":\"*\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicHeight\":\"24\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FramerIcon.map", "import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Custom Button Component\n *\n * 1. Reads the input fields by ID (via document.getElementById).\n * 2. Parses them to numbers (stripping out the $ and commas).\n * 3. Performs sample calculations.\n * 4. Feeds results to output components (via innerText).\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function CalculateZakatButton(props){const{buttonLabel,customId,backgroundColor,textColor,borderRadius,font,fontSize}=props;/**\n     * Helper: parseInput\n     * Grabs an input by its customId, strips out non-numeric characters,\n     * and returns a float. If parsing fails, returns 0.\n     */const parseInput=id=>{const el=document.getElementById(id);if(!el)return 0;// The value might look like \"$1,234.56\"\nlet rawValue=el.value||\"\";// Remove everything except digits, decimal point, and minus sign\nrawValue=rawValue.replace(/[^\\d.-]/g,\"\");const parsed=parseFloat(rawValue);return isNaN(parsed)?0:parsed;};/**\n     * Helper: setOutput\n     * Grabs an output element by its customId and sets its innerText\n     */const setOutput=(id,value)=>{const el=document.getElementById(id);if(el){el.innerText=value;}};/**\n     * Main calculation handler\n     */const handleClick=()=>{// -- 1) Grab all relevant inputs\nconst cash=parseInput(\"cash\")// ID must match the 'customId' in Currency_Input_Component\n;const gold=parseInput(\"gold\");const silver=parseInput(\"silver\");const debtsOwed=parseInput(\"debtsOwed\");const longTermShares=parseInput(\"longTermShares\");const shortTermShares=parseInput(\"shortTermShares\");const rrsp=parseInput(\"rrsp\");const resp=parseInput(\"resp\");const crypto=parseInput(\"crypto\");const propertiesForSale=parseInput(\"propertiesForSale\");const businessAssets=parseInput(\"businessAssets\");// Liabilities\nconst personalLiabilities=parseInput(\"personalLiabilities\");const businessLiabilities=parseInput(\"businessLiabilities\");// -- 2) Sample calculations (feel free to adapt for your formula)\nconst totalAssets=cash+gold*.8+silver+debtsOwed+longTermShares*.25+shortTermShares+rrsp+resp+crypto+propertiesForSale+businessAssets;const totalLiabilities=personalLiabilities+businessLiabilities;// Zakatable Assets = total assets - liabilities\nconst zakatableAssets=totalAssets-totalLiabilities;// Example: if we assume gold is the nisab basis (85g * goldPrice)\n// For demonstration, let's say gold is $60/g and we need 85g\n// This can also be read from an input if you prefer\nconst goldPrice=87.26;const nisabGold=goldPrice*85// e.g., $5,100\n;// If using silver, similarly you'd do (595g * silverPrice)\nlet zakatDue=0;if(zakatableAssets>=nisabGold){zakatDue=.025*zakatableAssets// 2.5%\n;}// -- 3) Set outputs\n// Format as currency\nconst formatCurrency=num=>{return num.toLocaleString(\"en-US\",{style:\"currency\",currency:\"CAD\"});};setOutput(\"totalAssetsOutput\",formatCurrency(totalAssets));setOutput(\"totalLiabilitiesOutput\",formatCurrency(totalLiabilities));setOutput(\"zakatableAssetsOutput\",formatCurrency(zakatableAssets));setOutput(\"zakatDueOutput\",formatCurrency(zakatDue));};return /*#__PURE__*/_jsx(\"button\",{id:customId,onClick:handleClick,style:{backgroundColor,color:textColor,borderRadius:`${borderRadius}px`,fontFamily:font?.fontFamily?.replace(/['\"]+/g,\"\")||\"Inter\",fontSize:`${fontSize}px`,cursor:\"pointer\",border:\"none\",padding:\"10px 20px\"},children:buttonLabel});}// Add property controls so you can style the button in Framer\naddPropertyControls(CalculateZakatButton,{customId:{type:ControlType.String,title:\"ID\",defaultValue:\"calculateZakatButton\",description:\"Please do not change ID value!\"},buttonLabel:{type:ControlType.String,title:\"Label\",defaultValue:\"Calculate\"},backgroundColor:{type:ControlType.Color,title:\"BG Color\",defaultValue:\"#0275d8\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#ffffff\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:8,min:0,max:50},font:{type:ControlType.Font,title:\"Font\",defaultValue:{family:\"Inter\",weight:400,size:16}},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:16,min:8,max:100}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CalculateZakatButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Zakat_Calc_btn.map"],
  "mappings": "yFAA+F,IAAMA,EAAc,UAAgBC,EAAY,m2BAAy2BC,EAAqB,IAQ3/B,SAARC,EAA6BC,EAAM,CAAC,IAAMC,EAAcC,EAAiBF,EAAM,IAAIA,EAAM,MAAMA,EAAM,WAAW,EAAE,OAAoBG,EAAK,MAAM,CAAC,MAAM,CAAC,QAAQ,OAAO,SAAS,OAAO,UAAU,OAAO,WAAW,SAAS,eAAe,SAAS,GAAGH,EAAM,KAAK,EAAE,wBAAwB,CAAC,OAAOC,CAAa,CAAC,CAAC,CAAE,CAACG,EAAoBL,EAAY,CAAC,IAAI,CAAC,MAAM,MAAM,KAAKM,EAAY,OAAO,aAAaR,CAAW,EAAE,YAAY,CAAC,KAAKQ,EAAY,OAAO,KAAK,IAAI,IAAI,GAAG,IAAI,EAAE,aAAaP,EAAqB,OAAOE,GAAOM,EAAgBN,EAAM,GAAG,CAAC,EAAE,MAAM,CAAC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,EAAeL,CAAW,CAAC,EAAEhB,EAAU,yBAAyBqB,EAAeJ,CAAgB,CAAC,EAAEjB,EAAU,wBAAwBqB,EAAeH,CAAe,CAAC,EAAElB,EAAU,iBAAiBqB,EAAeD,CAAQ,CAAC,CAAE,EAAqE,MAAM,CAAC,gBAAA9B,EAAgB,MAAMC,EAAU,aAAa,GAAGC,CAAY,KAAK,WAAWC,GAAM,YAAY,QAAQ,SAAS,EAAE,GAAG,QAAQ,SAAS,GAAGC,CAAQ,KAAK,OAAO,UAAU,OAAO,OAAO,QAAQ,WAAW,EAAE,SAASN,CAAW,CAAC,CAAE,CACtoBmC,EAAoBrC,EAAqB,CAAC,SAAS,CAAC,KAAKsC,EAAY,OAAO,MAAM,KAAK,aAAa,uBAAuB,YAAY,gCAAgC,EAAE,YAAY,CAAC,KAAKA,EAAY,OAAO,MAAM,QAAQ,aAAa,WAAW,EAAE,gBAAgB,CAAC,KAAKA,EAAY,MAAM,MAAM,WAAW,aAAa,SAAS,EAAE,UAAU,CAAC,KAAKA,EAAY,MAAM,MAAM,aAAa,aAAa,SAAS,EAAE,aAAa,CAAC,KAAKA,EAAY,OAAO,MAAM,SAAS,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,KAAK,CAAC,KAAKA,EAAY,KAAK,MAAM,OAAO,aAAa,CAAC,OAAO,QAAQ,OAAO,IAAI,KAAK,EAAE,CAAC,EAAE,SAAS,CAAC,KAAKA,EAAY,OAAO,MAAM,YAAY,aAAa,GAAG,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC",
  "names": ["DEFAULT_COLOR", "DEFAULT_SVG", "DEFAULT_STROKE_WIDTH", "FramerIcons", "props", "customizedSvg", "getCustomizedSVG", "p", "addPropertyControls", "ControlType", "hideStrokeWidth", "svg", "strokeWidthMatch", "match", "color", "strokeWidth", "svgAttributes", "width", "height", "viewBox", "viewBoxWidth", "viewBoxHeight", "hasElementsWithValidColors", "attr", "value", "CalculateZakatButton", "props", "buttonLabel", "customId", "backgroundColor", "textColor", "borderRadius", "font", "fontSize", "parseInput", "id", "el", "rawValue", "parsed", "setOutput", "value", "p", "cash", "gold", "silver", "debtsOwed", "longTermShares", "shortTermShares", "rrsp", "resp", "crypto", "propertiesForSale", "businessAssets", "personalLiabilities", "businessLiabilities", "totalAssets", "totalLiabilities", "zakatableAssets", "nisabGold", "zakatDue", "formatCurrency", "num", "addPropertyControls", "ControlType"]
}
