{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/IYwZH8XhD5xhkK14JGUI/MSTxsmAFh6aMUyrjuH45/ThentyComponentSwitch.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{cloneElement}from\"react\";import{hasTier}from\"https://framer.com/m/ThentyHelpers-I0Oh.js\";const fontWeights={100:\"Thin\",200:\"Extra-light\",300:\"Light\",400:\"Regular\",500:\"Medium\",600:\"Semi-bold\",700:\"Bold\",800:\"Extra-bold\",900:\"Black\"};const fallbackFont={fontFamily:\"Inter\",fontWeight:400};/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/#code-components-auto-sizing\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerSupportedLayoutType any\n */export default function ThentyComponentSwitch(props){const containerStyle={height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",overflow:\"hidden\",position:\"relative\"};const{lockedComponent,unlockedComponent,blockingButton,font,customFont,planIDs,link}=props;const buttonStyle={cursor:\"pointer\",background:blockingButton.buttonFill,color:blockingButton.textColor,borderColor:blockingButton.borderColor,borderWidth:blockingButton.borderWidth?`${blockingButton.borderWidth}px`:0,borderRadius:blockingButton.borderRadius,\"&:hover\":{background:blockingButton.hoverButtonFill,color:blockingButton.hoverTextColor},width:\"fit-content\",padding:blockingButton.customPadding?`${blockingButton.paddingTop}px ${blockingButton.paddingRight}px ${blockingButton.paddingBottom}px ${blockingButton.paddingLeft}px`:`${blockingButton.padding}px`,zIndex:100,...font.customFont?{fontFamily:font.fontFamily,fontWeight:parseInt(font.fontWeight),fontSize:`${font.fontSize}px`}:{fontSize:font.fontSize,...fallbackFont}};const absoluteContainerStyle={position:\"absolute\",height:\"100%\",width:\"100%\",display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",alignItems:\"center\",zIndex:1};const canAccess=hasTier(planIDs);let component=canAccess?unlockedComponent===null||unlockedComponent===void 0?void 0:unlockedComponent[0]:lockedComponent===null||lockedComponent===void 0?void 0:lockedComponent[0];if(component&&props.style){var _component_props;component=/*#__PURE__*/cloneElement(component,{style:{...(_component_props=component.props)===null||_component_props===void 0?void 0:_component_props.style,...props.style}});}if(blockingButton===null||blockingButton===void 0?void 0:blockingButton.label){var _blockingButton_label;return /*#__PURE__*/_jsx(\"div\",{style:containerStyle,children:canAccess?component:/*#__PURE__*/_jsxs(_Fragment,{children:[component,((_blockingButton_label=blockingButton.label)===null||_blockingButton_label===void 0?void 0:_blockingButton_label.length)?/*#__PURE__*/_jsx(\"div\",{style:absoluteContainerStyle,children:/*#__PURE__*/_jsx(\"a\",{href:link!==null&&link!==void 0?link:\"#\",children:/*#__PURE__*/_jsx(\"button\",{style:buttonStyle,children:blockingButton.label})})}):/*#__PURE__*/_jsx(_Fragment,{})]})});}else{return component;}}ThentyComponentSwitch.defaultProps={blockingButton:{label:\"Unlock Access\",buttonFill:\"#000000\",textColor:\"#FFFFFF\",hoverButtonFill:\"#ffffff\",hoverTextColor:\"#000000\",borderColor:\"#FAFAFA\",borderWidth:0,borderRadius:15,padding:15,customPadding:false},font:{fontSize:20,customFont:false}};/* CONFIG */addPropertyControls(ThentyComponentSwitch,{link:{title:\"Redirect Link\",type:ControlType.Link,defaultValue:\"/login\"},planIDs:{type:ControlType.Array,title:\"Plans Required\",control:{type:ControlType.String,title:\"Plan Dev ids\",defaultValue:\"Plan Dev Id\"}},blockingButton:{title:\"Button Settings\",type:ControlType.Object,controls:{label:{title:\"Button Label\",type:ControlType.String,defaultValue:\"Subscribe\"},buttonFill:{title:\"Button Fill\",type:ControlType.Color,defaultValue:\"#000000\"},textColor:{title:\"Text Color\",type:ControlType.Color,defaultValue:\"#FFFFFF\"},hoverButtonFill:{title:\"Hover Button Fill\",type:ControlType.Color,defaultValue:\"#ffffff\"},hoverTextColor:{title:\"Hover Text Color\",type:ControlType.Color,defaultValue:\"#000000\"},borderColor:{title:\"Border Color\",type:ControlType.Color,defaultValue:\"#FAFAFA\"},borderWidth:{title:\"Border Width\",type:ControlType.Number,displayStepper:true,defaultValue:0,min:0},borderRadius:{title:\"Border Radius\",type:ControlType.Number,displayStepper:true,defaultValue:15,min:0},padding:{type:ControlType.FusedNumber,toggleKey:\"customPadding\",toggleTitles:[\"Padding\",\"Custom padding\"],valueKeys:[\"paddingTop\",\"paddingRight\",\"paddingBottom\",\"paddingLeft\"],valueLabels:[\"Top\",\"Right\",\"Bottom\",\"Left\"],min:0,title:\"Inner Padding\"}}},font:{title:\"Font\",type:ControlType.Object,controls:{customFont:{type:ControlType.Boolean,title:\"Custom Font\",defaultValue:false,disabledTitle:\"Default\",enabledTitle:\"Custom\"},fontFamily:{type:ControlType.String,title:\"Family\",placeholder:\"Inter\",hidden:({customFont})=>!customFont},fontWeight:{type:ControlType.Enum,title:\"Weight\",options:Object.keys(fontWeights),defaultValue:400,optionTitles:Object.values(fontWeights),hidden:({customFont})=>!customFont},fontSize:{title:\"Font Size\",type:ControlType.Number,displayStepper:true,defaultValue:16}}},lockedComponent:{title:\"Locked Component\",type:ControlType.ComponentInstance},unlockedComponent:{title:\"Unlocked Component\",type:ControlType.ComponentInstance}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ThentyComponentSwitch\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutType\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ThentyComponentSwitch.map"],
  "mappings": "yLAAmO,IAAMA,EAAY,CAAC,IAAI,OAAO,IAAI,cAAc,IAAI,QAAQ,IAAI,UAAU,IAAI,SAAS,IAAI,YAAY,IAAI,OAAO,IAAI,aAAa,IAAI,OAAO,EAAQC,EAAa,CAAC,WAAW,QAAQ,WAAW,GAAG,EAOtZ,SAARC,EAAu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,EAAY,OAAO,eAAe,GAAK,aAAa,EAAE,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,gBAAgB,KAAKA,EAAY,OAAO,eAAe,GAAK,aAAa,GAAG,IAAI,CAAC,EAAE,QAAQ,CAAC,KAAKA,EAAY,YAAY,UAAU,gBAAgB,aAAa,CAAC,UAAU,gBAAgB,EAAE,UAAU,CAAC,aAAa,eAAe,gBAAgB,aAAa,EAAE,YAAY,CAAC,MAAM,QAAQ,SAAS,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,OAAO,KAAKA,EAAY,OAAO,SAAS,CAAC,WAAW,CAAC,KAAKA,EAAY,QAAQ,MAAM,cAAc,aAAa,GAAM,cAAc,UAAU,aAAa,QAAQ,EAAE,WAAW,CAAC,KAAKA,EAAY,OAAO,MAAM,SAAS,YAAY,QAAQ,OAAO,CAAC,CAAC,WAAAf,CAAU,IAAI,CAACA,CAAU,EAAE,WAAW,CAAC,KAAKe,EAAY,KAAK,MAAM,SAAS,QAAQ,OAAO,KAAKxB,CAAW,EAAE,aAAa,IAAI,aAAa,OAAO,OAAOA,CAAW,EAAE,OAAO,CAAC,CAAC,WAAAS,CAAU,IAAI,CAACA,CAAU,EAAE,SAAS,CAAC,MAAM,YAAY,KAAKe,EAAY,OAAO,eAAe,GAAK,aAAa,EAAE,CAAC,CAAC,EAAE,gBAAgB,CAAC,MAAM,mBAAmB,KAAKA,EAAY,iBAAiB,EAAE,kBAAkB,CAAC,MAAM,qBAAqB,KAAKA,EAAY,iBAAiB,CAAC,CAAC",
  "names": ["fontWeights", "fallbackFont", "ThentyComponentSwitch", "props", "containerStyle", "lockedComponent", "unlockedComponent", "blockingButton", "font", "customFont", "planIDs", "link", "buttonStyle", "absoluteContainerStyle", "canAccess", "hasTier", "component", "_component_props", "q", "_blockingButton_label", "p", "u", "l", "addPropertyControls", "ControlType"]
}
