{"version":3,"file":"PdfStylePreview.PSnSLeCc.mjs","names":["React.useState"],"sources":["https:/framerusercontent.com/modules/t7FUkJtx9tJAACA8PJhh/a45wc3RzGGXaPzFtv277/PdfStylePreview.js"],"sourcesContent":["// File: PdfStylePreview.tsx\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";const FONT_IMPORT=`\n@import url('https://fonts.googleapis.com/css2?family=Chivo+Mono:wght@400;500;600;700&display=swap');\n`;export function PdfStylePreview(props){const{images=[],initialIndex=0}=props;const[index,setIndex]=React.useState(Math.max(0,Math.min(initialIndex,images.length-1)));React.useEffect(()=>{// Keep index valid if images change\nif(index>=images.length)setIndex(Math.max(0,images.length-1));},[images.length,index]);// Layout constants / colors (from your screenshot)\nconst SIDEBAR_BG=\"#BDBDBD\";const THUMB_BG=\"#EDEDED\";const THUMB_BORDER=\"#C8C8C8\";const SELECT_COLOR=\"#0069FF\";const TEXT_COLOR=\"#757575\";return /*#__PURE__*/_jsxs(\"div\",{style:styles.wrapper,children:[/*#__PURE__*/_jsx(\"style\",{children:FONT_IMPORT}),/*#__PURE__*/_jsxs(\"div\",{style:{...styles.container,maxWidth:1200,padding:\"0 20px\"},children:[/*#__PURE__*/_jsx(\"aside\",{style:{...styles.sidebar,background:SIDEBAR_BG},children:/*#__PURE__*/_jsx(\"div\",{style:styles.thumbnailList,children:images.map((item,i)=>/*#__PURE__*/_jsxs(\"button\",{onClick:()=>setIndex(i),\"aria-pressed\":i===index,style:{...styles.thumbButton,background:THUMB_BG,border:i===index?`6px solid ${THUMB_BORDER}`:`1px solid ${THUMB_BORDER}`,boxShadow:i===index?\"inset 0 0 0 6px rgba(0,0,0,0.00)\":\"none\"},children:[/*#__PURE__*/_jsx(\"div\",{style:styles.thumbImageWrap,children:item.image?/*#__PURE__*/_jsx(\"img\",{src:item.image,alt:item.title||`thumbnail-${i}`,style:styles.thumbImage}):/*#__PURE__*/_jsx(\"div\",{style:styles.thumbPlaceholder})}),/*#__PURE__*/_jsx(\"div\",{style:styles.thumbLabelWrap,children:/*#__PURE__*/_jsx(\"span\",{style:{...styles.thumbLabel,color:TEXT_COLOR},children:item.title||`image-${i+1}.jpg`})}),i===index&&/*#__PURE__*/_jsx(\"div\",{style:{...styles.selectedBar,background:SELECT_COLOR}})]},i))})}),/*#__PURE__*/_jsx(\"main\",{style:styles.previewWrap,children:images[index]&&images[index].image?/*#__PURE__*/_jsx(\"img\",{src:images[index].image,alt:images[index].title||`preview-${index}`,style:styles.previewImage,draggable:false}):/*#__PURE__*/_jsx(\"div\",{style:styles.emptyPreview,children:/*#__PURE__*/_jsx(\"div\",{style:{color:TEXT_COLOR,fontFamily:\"Chivo Mono, monospace\",fontSize:16},children:\"No image selected\"})})})]})]});}/** --------------------------\n *  Styles\n *  -------------------------- */const styles={wrapper:{width:\"100%\",boxSizing:\"border-box\",fontFamily:\"Chivo Mono, monospace\",fontSize:16,letterSpacing:\"-0.03em\",lineHeight:\"1.4em\"},// Layout container (holds sidebar + preview)\ncontainer:{display:\"flex\",flexDirection:\"row\",gap:24,width:\"100%\",boxSizing:\"border-box\",margin:\"0 auto\"},// Sidebar (desktop vertical) - becomes top horizontal on mobile via media query in style tag below\nsidebar:{width:160,minWidth:140,maxWidth:220,height:\"calc(100vh - 40px)\",boxSizing:\"border-box\",overflowY:\"auto\",padding:12,borderRadius:6},thumbnailList:{display:\"flex\",flexDirection:\"column\",gap:20,alignItems:\"stretch\"},thumbButton:{display:\"flex\",flexDirection:\"column\",alignItems:\"center\",padding:8,borderRadius:8,cursor:\"pointer\",background:\"transparent\",outline:\"none\",position:\"relative\",textDecoration:\"none\"},thumbImageWrap:{width:\"100%\",borderRadius:6,overflow:\"hidden\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",background:\"#fff\",boxSizing:\"border-box\"},thumbImage:{width:\"100%\",height:120,objectFit:\"cover\",display:\"block\"},thumbPlaceholder:{width:\"100%\",height:120,background:\"#f0f0f0\"},thumbLabelWrap:{marginTop:8,textAlign:\"center\",padding:\"6px 8px\",boxSizing:\"border-box\",width:\"100%\"},thumbLabel:{display:\"inline-block\",fontSize:14,whiteSpace:\"nowrap\",overflow:\"hidden\",textOverflow:\"ellipsis\"},selectedBar:{position:\"absolute\",left:6,right:6,bottom:6,height:6,borderRadius:4},previewWrap:{flex:1,height:\"70vh\",borderRadius:8,background:\"#ffffff\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",overflow:\"hidden\"},previewImage:{maxWidth:\"100%\",maxHeight:\"100%\",objectFit:\"contain\",display:\"block\",userSelect:\"none\"},emptyPreview:{width:\"100%\",height:400,display:\"flex\",alignItems:\"center\",justifyContent:\"center\"}};/** --------------------------\n *  Responsive adjustments\n *\n *  Framer code components don't allow external CSS files,\n *  so we inject a small responsive stylesheet for the mobile behavior.\n *  -------------------------- */const responsiveStyle=`\n/* Mobile: make sidebar a horizontal top bar */\n@media (max-width: 768px) {\n  .framer-pdf-preview-root {\n    padding: 0 !important;\n  }\n\n  .framer-pdf-preview-root .container {\n    flex-direction: column !important;\n    gap: 12px !important;\n  }\n\n  .framer-pdf-preview-root aside {\n    width: 100% !important;\n    height: auto !important;\n    overflow-x: auto !important;\n    overflow-y: hidden !important;\n    padding: 10px 8px !important;\n    display: block !important;\n  }\n\n  .framer-pdf-preview-root aside .thumbnail-list {\n    flex-direction: row !important;\n    gap: 12px !important;\n    align-items: flex-start !important;\n  }\n\n  .framer-pdf-preview-root aside button {\n    min-width: 120px !important;\n    flex: 0 0 auto !important;\n  }\n\n  .framer-pdf-preview-root main {\n    width: 100% !important;\n  }\n\n  /* make preview taller on mobile for visual balance */\n  .framer-pdf-preview-root main img {\n    height: 60vh !important;\n  }\n}\n`;/** Inject the responsive styles into the page's head (side-effect safe) */if(typeof document!==\"undefined\"){const id=\"framer-pdf-preview-responsive-styles\";if(!document.getElementById(id)){const styleTag=document.createElement(\"style\");styleTag.id=id;styleTag.innerHTML=responsiveStyle;document.head.appendChild(styleTag);}}/** --------------------------\n * Property Controls for Framer\n * ---------------------------*/addPropertyControls(PdfStylePreview,{images:{title:\"Images\",type:ControlType.Array,propertyControl:{type:ControlType.Object,controls:{image:{type:ControlType.Image,title:\"Image\"},title:{type:ControlType.String,title:\"Label\"}}},defaultValue:[{image:\"\",title:\"one.jpg\"},{image:\"\",title:\"two.jpg\"},{image:\"\",title:\"three.jpg\"}]},initialIndex:{title:\"Start Index\",type:ControlType.Number,min:0,max:10,defaultValue:0}});\nexport const __FramerMetadata__ = {\"exports\":{\"PdfStylePreview\":{\"type\":\"reactComponent\",\"name\":\"PdfStylePreview\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PdfStylePreview.map"],"mappings":"iRAGE,SAAgB,EAAgB,EAAM,CAAC,GAAK,CAAC,SAAO,EAAE,CAAC,eAAa,GAAG,EAAW,CAAC,EAAM,GAAUA,EAAe,KAAK,IAAI,EAAE,KAAK,IAAI,EAAa,EAAO,OAAO,EAAE,CAAC,CAAC,CAAC,MAAoB,CACzL,GAAO,EAAO,QAAO,EAAS,KAAK,IAAI,EAAE,EAAO,OAAO,EAAE,CAAC,EAAG,CAAC,EAAO,OAAO,EAAM,CAAC,CACtF,IAA0D,EAAa,UAA6C,EAAW,UAAU,OAAoB,EAAM,MAAM,CAAC,MAAM,EAAO,QAAQ,SAAS,CAAc,EAAK,QAAQ,CAAC,SAAS,EAAY,CAAC,CAAc,EAAM,MAAM,CAAC,MAAM,CAAC,GAAG,EAAO,UAAU,SAAS,KAAK,QAAQ,SAAS,CAAC,SAAS,CAAc,EAAK,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAO,QAAQ,WAAW,UAAW,CAAC,SAAsB,EAAK,MAAM,CAAC,MAAM,EAAO,cAAc,SAAS,EAAO,KAAK,EAAK,IAAiB,EAAM,SAAS,CAAC,YAAY,EAAS,EAAE,CAAC,eAAe,IAAI,EAAM,MAA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