{"version":3,"file":"DesignFlow.DM1MdJGA.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/JzowDUGJqvtlNHi90qtL/P91ZdIcDcdltZ5iYYH3U/DesignFlow.js"],"sourcesContent":["// DesignFlow.tsx — Framer Code Component\n// Tab switcher for case study design flows.\n// Up to 6 tabs. Set unused tabs to \"Hidden\" in the Properties Panel.\n// Assets → Code → New Component → paste → Save → drag onto canvas\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{useState}from\"react\";import{motion,AnimatePresence}from\"framer-motion\";// ─── MAIN COMPONENT ───────────────────────────────────────────────────────────\nexport default function DesignFlow({// Layout\naccentColor=\"#111111\",imageRadius=16,imageAspect=\"16/9\",descFontSize=16,descColor=\"#444444\",fontFamily=\"Poppins, sans-serif\",// Tab 1\nt1Label=\"Onboarding\",t1Desc=\"Confirms fan identity through a verified-fan process before entering the ticket queue.\",t1Image,t1Color=\"#1a1a2e\",t1Visible=true,// Tab 2\nt2Label=\"Purchase\",t2Desc=\"Guides users through a fair, transparent ticket purchasing experience.\",t2Image,t2Color=\"#0f0c29\",t2Visible=true,// Tab 3\nt3Label=\"Resale\",t3Desc=\"Allows fans to resell tickets within price cap limits, keeping tickets fair and within the community.\",t3Image,t3Color=\"#302b63\",t3Visible=true,// Tab 4\nt4Label=\"Wallet\",t4Desc=\"Stores verified tickets securely with easy access to manage, transfer, or resell.\",t4Image,t4Color=\"#24243e\",t4Visible=true,// Tab 5\nt5Label=\"Tab 5\",t5Desc=\"Description for this flow step.\",t5Image,t5Color=\"#f0efeb\",t5Visible=false,// Tab 6\nt6Label=\"Tab 6\",t6Desc=\"Description for this flow step.\",t6Image,t6Color=\"#f0efeb\",t6Visible=false}){const isCanvas=RenderTarget.current()===RenderTarget.canvas;// Assemble visible tabs\nconst allTabs=[{label:t1Label,description:t1Desc,image:t1Image,fallbackColor:t1Color,visible:t1Visible},{label:t2Label,description:t2Desc,image:t2Image,fallbackColor:t2Color,visible:t2Visible},{label:t3Label,description:t3Desc,image:t3Image,fallbackColor:t3Color,visible:t3Visible},{label:t4Label,description:t4Desc,image:t4Image,fallbackColor:t4Color,visible:t4Visible},{label:t5Label,description:t5Desc,image:t5Image,fallbackColor:t5Color,visible:t5Visible},{label:t6Label,description:t6Desc,image:t6Image,fallbackColor:t6Color,visible:t6Visible}].filter(t=>t.visible);const[activeIndex,setActiveIndex]=useState(0);// Guard: if active index is out of range after a tab is hidden\nconst safeIndex=Math.min(activeIndex,allTabs.length-1);const active=allTabs[safeIndex];if(!active){return /*#__PURE__*/_jsx(\"div\",{style:{padding:40,textAlign:\"center\",color:\"#aaa\",fontSize:14},children:\"No tabs visible — enable at least one tab in the Properties Panel.\"});}return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",fontFamily:fontFamily},children:[/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",gap:8,flexWrap:\"wrap\",marginBottom:32},children:allTabs.map((tab,i)=>{const isActive=i===safeIndex;return /*#__PURE__*/_jsx(motion.button,{onClick:()=>setActiveIndex(i),whileTap:{scale:.96},style:{padding:\"9px 20px\",borderRadius:100,border:`1.5px solid ${isActive?accentColor:\"rgba(0,0,0,0.12)\"}`,background:isActive?accentColor:\"transparent\",color:isActive?\"#fff\":\"#555\",fontSize:14,fontWeight:500,cursor:\"pointer\",transition:\"all 0.2s ease\",fontFamily:\"inherit\",lineHeight:1},children:tab.label},tab.label);})}),/*#__PURE__*/_jsx(AnimatePresence,{mode:\"wait\",children:/*#__PURE__*/_jsxs(motion.div,{initial:isCanvas?false:{opacity:0,y:12},animate:{opacity:1,y:0},exit:isCanvas?{}:{opacity:0,y:-8},transition:{duration:.28,ease:[.4,0,.2,1]},style:{display:\"flex\",flexDirection:\"column\",gap:24,width:\"100%\"},children:[/*#__PURE__*/_jsx(\"p\",{style:{fontSize:descFontSize,color:descColor,lineHeight:1.7,margin:0,maxWidth:640},children:active.description}),/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",aspectRatio:imageAspect,borderRadius:imageRadius,overflow:\"hidden\",background:active.fallbackColor,backgroundImage:active.image?`url(${active.image})`:undefined,backgroundSize:\"cover\",backgroundPosition:\"center top\"}})]},safeIndex)})]});}// ─── PROPERTY CONTROLS ────────────────────────────────────────────────────────\n// Helper: generates controls for one tab slot\nfunction tabControls(n,defaultVisible){const t=`t${n}`;return{[`${t}Label`]:{type:ControlType.String,title:`${n} \\xb7 Label`,defaultValue:`Tab ${n}`},[`${t}Desc`]:{type:ControlType.String,title:`${n} \\xb7 Description`,defaultValue:\"Description for this flow step.\",displayTextArea:true},[`${t}Image`]:{type:ControlType.Image,title:`${n} \\xb7 Image`},[`${t}Color`]:{type:ControlType.Color,title:`${n} \\xb7 Fallback bg`,defaultValue:\"#f0efeb\"},[`${t}Visible`]:{type:ControlType.Boolean,title:`${n} \\xb7 Visible`,defaultValue:defaultVisible}};}addPropertyControls(DesignFlow,{// ── Layout ──────────────────────────────────────────────────────────\naccentColor:{type:ControlType.Color,title:\"Active tab color\",defaultValue:\"#111111\"},imageAspect:{type:ControlType.Enum,title:\"Image ratio\",options:[\"16/9\",\"4/3\",\"1/1\",\"3/4\"],optionTitles:[\"16:9 Landscape\",\"4:3 Standard\",\"1:1 Square\",\"3:4 Portrait\"],defaultValue:\"16/9\"},imageRadius:{type:ControlType.Number,title:\"Image radius\",defaultValue:16,min:0,max:32,step:2,displayStepper:true},descFontSize:{type:ControlType.Number,title:\"Description size\",defaultValue:16,min:12,max:32,step:1,displayStepper:true},descColor:{type:ControlType.Color,title:\"Description color\",defaultValue:\"#444444\"},fontFamily:{type:ControlType.String,title:\"Font family\",defaultValue:\"Poppins, sans-serif\"},// ── Tab slots ───────────────────────────────────────────────────────\n// Toggle \"N · Visible\" off to hide a tab\n...tabControls(1,true),...tabControls(2,true),...tabControls(3,true),...tabControls(4,true),...tabControls(5,false),...tabControls(6,false)});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":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