{"version":3,"file":"ButtonStack.CIwtet74.mjs","names":[],"sources":["https:/framerusercontent.com/modules/8p2z5BM6zDZBWk0aw8A3/8YjJoRd1l9sO01JQD1dz/ButtonStack.js"],"sourcesContent":["// ButtonStack.tsx  — versión completa con visor PDF en blob:\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/* ---------- Componente ---------- */export default function ButtonStack(props){const{button1Text,button1Bg,button1Color,button1Font,button1Width,button1Height,button1File,button2Text,button2Bg,button2Color,button2Font,button2Width,button2Height,button2Link,style}=props;/* visor PDF robusto */const openPdfViewer=url=>{const html=`\n          <!doctype html><html><head>\n            <title>${button1Text}</title>\n            <style>html,body{height:100%;margin:0}\n                   iframe{border:0;width:100%;height:100%}</style>\n          </head><body>\n            <iframe src=\"${url}#toolbar=0\"></iframe>\n          </body></html>`;const blob=new Blob([html],{type:\"text/html\"});const blobURL=URL.createObjectURL(blob);window.open(blobURL,\"_blank\",\"noopener,noreferrer\");};const handleButton1=()=>{if(!button1File)return;if(/\\.pdf(\\?.*)?$/i.test(button1File)){openPdfViewer(button1File);}else{window.open(button1File,\"_blank\",\"noopener,noreferrer\");}};/* ---------- UI ---------- */const base=(w,h,bg,color,font)=>({width:w,height:h,background:bg,color,border:\"none\",borderRadius:8,cursor:\"pointer\",...font});return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:16,alignItems:\"center\",...style},children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:handleButton1,style:base(button1Width,button1Height,button1Bg,button1Color,button1Font),children:button1Text}),/*#__PURE__*/_jsx(\"a\",{href:button2Link,target:\"_blank\",rel:\"noopener noreferrer\",style:{textDecoration:\"none\"},children:/*#__PURE__*/_jsx(\"button\",{type:\"button\",style:base(button2Width,button2Height,button2Bg,button2Color,button2Font),children:button2Text})})]});}/* ---------- Property Controls ---------- */addPropertyControls(ButtonStack,{/* Botón 1 */button1Text:{type:ControlType.String,title:\"Texto 1\",defaultValue:\"VER PROGRAMA\"},button1File:{type:ControlType.File,title:\"Archivo 1\",allowedFileTypes:[\"pdf\",\"jpg\",\"jpeg\",\"png\",\"doc\",\"docx\"]},button1Bg:{type:ControlType.Color,title:\"Fondo 1\",defaultValue:\"#111111\"},button1Color:{type:ControlType.Color,title:\"Texto 1\",defaultValue:\"#FFFFFF\"},button1Font:{type:ControlType.Font,title:\"Font 1\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"16px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}},button1Width:{type:ControlType.Number,title:\"Ancho 1\",defaultValue:180,min:40,max:400,unit:\"px\"},button1Height:{type:ControlType.Number,title:\"Alto 1\",defaultValue:48,min:24,max:120,unit:\"px\"},/* Botón 2 */button2Text:{type:ControlType.String,title:\"Texto 2\",defaultValue:\"Recomend\\xe1 la obra\"},button2Link:{type:ControlType.Link,title:\"Link 2\",defaultValue:\"https://wa.me/?text=\\xa1Ten\\xe9s%20que%20ver%20esto!\"},button2Bg:{type:ControlType.Color,title:\"Fondo 2\",defaultValue:\"#CC0044\"},button2Color:{type:ControlType.Color,title:\"Texto 2\",defaultValue:\"#FFFFFF\"},button2Font:{type:ControlType.Font,title:\"Font 2\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"16px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}},button2Width:{type:ControlType.Number,title:\"Ancho 2\",defaultValue:180,min:40,max:400,unit:\"px\"},button2Height:{type:ControlType.Number,title:\"Alto 2\",defaultValue:48,min:24,max:120,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ButtonStack\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ButtonStack.map"],"mappings":"iLACmJ,SAAwB,EAAY,EAAM,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