{"version":3,"file":"Bouton_PDF_importable.DLSmGPJs.mjs","names":["React.useMemo","React.useCallback"],"sources":["https:/framerusercontent.com/modules/aOoL2bAjHhJ1VULuKREk/z9EEBznanMHyEZtodSYb/Bouton_PDF_importable.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function BoutonPDFImportable(props){const{label,textColor,borderColor,background,radius,horizontalPadding,verticalPadding,fontSize,pdfFile=\"\",style}=props;const isPdfSelected=Boolean(pdfFile);const baseStyle=React.useMemo(()=>({position:\"relative\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",width:\"max-content\",minWidth:\"max-content\",textDecoration:\"none\",color:textColor,background,border:`1px solid ${borderColor}`,borderRadius:radius,padding:`${verticalPadding}px ${horizontalPadding}px`,fontSize,lineHeight:1,cursor:isPdfSelected?\"pointer\":\"default\",userSelect:\"none\",WebkitUserSelect:\"none\",opacity:isPdfSelected?1:.7}),[background,borderColor,fontSize,horizontalPadding,isPdfSelected,radius,textColor,verticalPadding]);const handleNoPdfClick=React.useCallback(event=>{event.preventDefault();},[]);if(isPdfSelected){return /*#__PURE__*/_jsx(\"a\",{href:pdfFile,target:\"_blank\",rel:\"noopener noreferrer\",\"aria-label\":label,style:{...baseStyle,...style},children:label});}return /*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":label,onClick:handleNoPdfClick,style:{...baseStyle,...style},children:label});}addPropertyControls(BoutonPDFImportable,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"T\\xe9l\\xe9charger le PDF\"},pdfFile:{type:ControlType.File,title:\"PDF\",allowedFileTypes:[\"pdf\"]},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#000000\"},borderColor:{type:ControlType.Color,title:\"Border\",defaultValue:\"#EEEEEE\"},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:8,min:0,max:100,step:1,unit:\"px\"},horizontalPadding:{type:ControlType.Number,title:\"H Padding\",defaultValue:16,min:0,max:64,step:1,unit:\"px\"},verticalPadding:{type:ControlType.Number,title:\"V Padding\",defaultValue:10,min:0,max:48,step:1,unit:\"px\"},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:14,min:8,max:48,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BoutonPDFImportable\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Bouton_PDF_importable.map"],"mappings":"iLAGG,SAAwB,EAAoB,EAAM,CAAC,GAAK,CAAC,QAAM,YAAU,cAAY,aAAW,SAAO,oBAAkB,kBAAgB,WAAS,UAAQ,GAAG,SAAO,EAAY,EAAc,EAAQ,EAAe,EAAUA,OAAmB,CAAC,SAAS,WAAW,QAAQ,cAAc,WAAW,SAAS,eAAe,SAAS,MAAM,cAAc,SAAS,cAAc,eAAe,OAAO,MAAM,EAAU,aAAW,OAAO,aAAa,IAAc,aAAa,EAAO,QAAQ,GAAG,EAAgB,KAAK,EAAkB,IAAI,WAAS,WAAW,EAAE,OAAO,EAAc,UAAU,UAAU,WAAW,OAAO,iBAAiB,OAAO,QAAQ,EAAc,EAAE,EAAE,GAAG,CAAC,EAAW,EAAY,EAAS,EAAkB,EAAc,EAAO,EAAU,CAAe,CAAC,EAAQ,EAAiBC,EAAkB,GAAO,CAAC,EAAM,eAAe,CAAE,EAAE,CAAC,CAAC,EAA4K,OAAvK,EAAmC,EAAK,IAAI,CAAC,KAAK,EAAQ,OAAO,SAAS,IAAI,sBAAsB,aAAa,EAAM,MAAM,CAAC,GAAG,EAAU,GAAG,CAAK,EAAE,SAAS,CAAK,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