{"version":3,"file":"TabSwitcher.B-FtevDf.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/WknI6X3Qa2qpn1t3m7Nr/NahTBDunNvBSL2x0pIQM/TabSwitcher.js"],"sourcesContent":["// Tab Switcher component with slot-based content areas for each tab\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Tab Switcher\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function TabSwitcher(props){const{tabs,activeTabColor,inactiveTabColor,activeTextColor,inactiveTextColor,backgroundColor,borderRadius,tabFont,gap,padding,outlineColor,outlineWidth,tab1Content,tab2Content,useGradient,gradientColor1,gradientColor2,gradientDirection}=props;const[activeTab,setActiveTab]=useState(0);const handleTabClick=index=>{startTransition(()=>setActiveTab(index));};const contentMap=[tab1Content,tab2Content];return /*#__PURE__*/_jsxs(\"div\",{style:{...props.style,position:\"relative\",width:\"100%\",height:\"100%\",display:\"flex\",flexDirection:\"column\",gap:`${gap}px`},children:[/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",gap:\"8px\",backgroundColor:backgroundColor,padding:`${padding}px`,borderRadius:`${borderRadius}px`,width:\"fit-content\",alignSelf:\"flex-start\",border:`${outlineWidth}px solid ${outlineColor}`},children:tabs.map((tab,index)=>/*#__PURE__*/_jsx(\"button\",{onClick:()=>handleTabClick(index),style:{background:activeTab===index&&useGradient?`linear-gradient(${gradientDirection}, ${gradientColor1}, ${gradientColor2})`:activeTab===index?activeTabColor:inactiveTabColor,color:activeTab===index?activeTextColor:inactiveTextColor,border:\"none\",borderRadius:`${borderRadius-4}px`,padding:\"12px 24px\",cursor:\"pointer\",transition:\"all 0.3s ease\",...tabFont},\"aria-pressed\":activeTab===index,role:\"tab\",children:tab.label},index))}),/*#__PURE__*/_jsx(\"div\",{style:{flex:1,width:\"100%\",position:\"relative\",overflow:\"hidden\",display:\"flex\",alignItems:\"flex-start\"},children:contentMap[activeTab]})]});}addPropertyControls(TabSwitcher,{tabs:{type:ControlType.Array,title:\"Tabs\",control:{type:ControlType.Object,controls:{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Tab\"}}},defaultValue:[{label:\"Clippers\"},{label:\"Brands\"}]},useGradient:{type:ControlType.Boolean,title:\"Use Gradient\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\"},gradientColor1:{type:ControlType.Color,title:\"Gradient Start\",defaultValue:\"#FF6B1A\",hidden:({useGradient})=>!useGradient},gradientColor2:{type:ControlType.Color,title:\"Gradient End\",defaultValue:\"#FF8C42\",hidden:({useGradient})=>!useGradient},gradientDirection:{type:ControlType.Enum,title:\"Direction\",options:[\"to right\",\"to left\",\"to bottom\",\"to top\",\"135deg\",\"45deg\"],optionTitles:[\"Right\",\"Left\",\"Bottom\",\"Top\",\"Diagonal ↘\",\"Diagonal ↗\"],defaultValue:\"to right\",hidden:({useGradient})=>!useGradient},activeTabColor:{type:ControlType.Color,title:\"Active Tab\",defaultValue:\"#FF6B1A\",hidden:({useGradient})=>useGradient},inactiveTabColor:{type:ControlType.Color,title:\"Inactive Tab\",defaultValue:\"#EEEEEE\"},activeTextColor:{type:ControlType.Color,title:\"Active Text\",defaultValue:\"#FFFFFF\"},inactiveTextColor:{type:ControlType.Color,title:\"Inactive Text\",defaultValue:\"#666666\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#F5F5F5\"},outlineColor:{type:ControlType.Color,title:\"Outline Color\",defaultValue:\"#CCCCCC\"},outlineWidth:{type:ControlType.Number,title:\"Outline Width\",defaultValue:1,min:0,max:10,step:1,unit:\"px\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:32,min:0,max:50,step:1,unit:\"px\"},tabFont:{type:ControlType.Font,title:\"Tab Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}},gap:{type:ControlType.Number,title:\"Content Gap\",defaultValue:32,min:0,max:100,step:1,unit:\"px\"},padding:{type:ControlType.Number,title:\"Tab Padding\",defaultValue:4,min:0,max:20,step:1,unit:\"px\"},tab1Content:{type:ControlType.ComponentInstance,title:\"Tab 1 Content\"},tab2Content:{type:ControlType.ComponentInstance,title:\"Tab 2 Content\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TabSwitcher\",\"slots\":[\"tab1Content\",\"tab2Content\"],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TabSwitcher.map"],"mappings":"yLAMG,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,OAAK,iBAAe,mBAAiB,kBAAgB,oBAAkB,kBAAgB,eAAa,UAAQ,MAAI,UAAQ,eAAa,eAAa,cAAY,cAAY,cAAY,iBAAe,iBAAe,qBAAmB,EAAW,CAAC,EAAU,GAAcA,EAAS,EAAE,CAAO,EAAe,GAAO,CAAC,MAAoB,EAAa,EAAM,CAAC,EAAS,EAAW,CAAC,EAAY,EAAY,CAAC,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,MAAM,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,QAAQ,OAAO,cAAc,SAAS,IAAI,GAAG,EAAI,IAAI,CAAC,SAAS,CAAc,EAAK,MAAM,CAAC,MAAM,CAAC,QAAQ,OAAO,IAAI,MAAsB,kBAAgB,QAAQ,GAAG,EAAQ,IAAI,aAAa,GAAG,EAAa,IAAI,MAAM,cAAc,UAAU,aAAa,OAAO,GAAG,EAAa,WAAW,IAAe,CAAC,SAAS,EAAK,KAAK,EAAI,IAAqB,EAAK,SAAS,CAAC,YAAY,EAAe,EAAM,CAAC,MAAM,CAAC,WAAW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