{"version":3,"file":"UrlInput.BprOV4Sm.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/4mxqjeDO3xdOXIeL4trR/wDWuB9EGkNbNrBfjVZdc/UrlInput.js"],"sourcesContent":["// URL input form with customizable https:// prefix and submit button\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function UrlInput(props){const{placeholder=\"www.example.com\",submitLabel=\"Submit\",prefix=\"https://\",prefixColor=\"#666666\",prefixBackground=\"#F5F5F5\",inputBackground=\"#FFFFFF\",inputBorder=\"#EEEEEE\",inputTextColor=\"#000000\",buttonBackground=\"#000000\",buttonTextColor=\"#FFFFFF\",buttonHoverBackground=\"#333333\",borderRadius=8,inputFont,buttonFont,prefixFont,webhookUrl=\"\",onSubmit,style,inputLabel=\"Enter your website URL\",buttonLabel=\"Get Started\",source=\"landing\",role=\"\",roleLabel=\"I am a\",roleOptions=[\"Rights holder\",\"Brand\",\"Agency\"],roleTextColor=\"#000000\",roleSelectedColor=\"#000000\",roleFont,mainGap=8,roleGap=16,buttonPadding=\"12px 24px\"}=props;const[inputValue,setInputValue]=useState(\"\");const[isSubmitting,setIsSubmitting]=useState(false);const[selectedRole,setSelectedRole]=useState(\"\");const[isHovered,setIsHovered]=useState(false);const[roleError,setRoleError]=useState(\"\");const handleSubmit=async e=>{e.preventDefault();// Validate that at least one role is selected\nif(!selectedRole){setRoleError(\"Please select at least one role\");return;}setRoleError(\"\");const fullUrl=prefix+inputValue;setIsSubmitting(true);// Map the selected role to the correct format\nlet roleParam=\"\";if(selectedRole===\"Rights holder\"){roleParam=\"rights_holder\";}else if(selectedRole===\"Brand\"){roleParam=\"brand\";}else if(selectedRole===\"Agency\"){roleParam=\"agency\";}// Redirect to the specified route with the parameters\nif(typeof window!==\"undefined\"){const encodedUrl=encodeURIComponent(fullUrl);const encodedSource=encodeURIComponent(source);const encodedRole=encodeURIComponent(roleParam);const redirectUrl=`https://sponza-ai.vercel.app/onboarding?url=${encodedUrl}&source=${encodedSource}&role=${encodedRole}`;window.location.href=redirectUrl;}};return /*#__PURE__*/_jsxs(\"form\",{onSubmit:handleSubmit,style:{...style,display:\"flex\",flexDirection:\"column\",gap:`${mainGap}px`,width:\"100%\",position:\"relative\"},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                @media (max-width: 768px) {\n                    .url-input-container {\n                        flex-direction: column !important;\n                        align-items: stretch !important;\n                    }\n                    .url-input-prefix {\n                        border-right: none !important;\n                        border-bottom: 1px solid ${inputBorder} !important;\n                        padding: 10px 12px !important;\n                        width: 100% !important;\n                        box-sizing: border-box !important;\n                    }\n                    .url-input-field {\n                        padding: 10px 12px !important;\n                        width: 100% !important;\n                        box-sizing: border-box !important;\n                    }\n                    .role-options-container {\n                        gap: 12px !important;\n                    }\n                    .role-option-label {\n                        font-size: 14px !important;\n                    }\n                    .submit-button {\n                        padding: 14px 20px !important;\n                        font-size: 15px !important;\n                    }\n                    .input-label, .role-label {\n                        font-size: 14px !important;\n                    }\n                }\n            `}),roleLabel&&/*#__PURE__*/_jsxs(\"div\",{style:{marginBottom:\"8px\"},children:[/*#__PURE__*/_jsx(\"label\",{className:\"role-label\",style:{...roleFont,color:roleTextColor,marginBottom:\"8px\",display:\"block\"},children:roleLabel}),/*#__PURE__*/_jsx(\"div\",{className:\"role-options-container\",style:{display:\"flex\",gap:`${roleGap}px`,flexWrap:\"wrap\"},children:roleOptions.map(option=>/*#__PURE__*/_jsxs(\"label\",{className:\"role-option-label\",style:{display:\"flex\",alignItems:\"center\",gap:\"8px\",cursor:\"pointer\",...roleFont},children:[/*#__PURE__*/_jsx(\"input\",{type:\"radio\",name:\"role\",value:option,checked:selectedRole===option,onChange:e=>{setSelectedRole(e.target.value);setRoleError(\"\");},style:{cursor:\"pointer\",accentColor:roleSelectedColor}}),/*#__PURE__*/_jsx(\"span\",{style:{color:roleTextColor},children:option})]},option))}),roleError&&/*#__PURE__*/_jsx(\"div\",{style:{color:\"#FF0000\",fontSize:\"14px\",marginTop:\"4px\",...roleFont},children:roleError})]}),inputLabel&&/*#__PURE__*/_jsx(\"label\",{className:\"input-label\",style:{...inputFont,color:inputTextColor,marginBottom:\"4px\"},children:inputLabel}),/*#__PURE__*/_jsxs(\"div\",{className:\"url-input-container\",style:{display:\"flex\",alignItems:\"center\",border:`1px solid ${inputBorder}`,borderRadius:`${borderRadius}px`,overflow:\"hidden\",backgroundColor:inputBackground,width:\"100%\"},children:[/*#__PURE__*/_jsx(\"div\",{className:\"url-input-prefix\",style:{padding:\"12px 16px\",backgroundColor:prefixBackground,color:prefixColor,borderRight:`1px solid ${inputBorder}`,whiteSpace:\"nowrap\",...prefixFont},children:prefix}),/*#__PURE__*/_jsx(\"input\",{type:\"text\",className:\"url-input-field\",value:inputValue,onChange:e=>setInputValue(e.target.value),placeholder:placeholder,style:{flex:1,padding:\"12px 16px\",border:\"none\",outline:\"none\",backgroundColor:\"transparent\",color:inputTextColor,...inputFont},required:true,disabled:isSubmitting,autoComplete:\"off\",autoCorrect:\"off\",autoCapitalize:\"off\",spellCheck:false})]}),/*#__PURE__*/_jsx(\"button\",{type:\"submit\",className:\"submit-button\",disabled:isSubmitting,onMouseEnter:()=>setIsHovered(true),onMouseLeave:()=>setIsHovered(false),style:{padding:buttonPadding,backgroundColor:isSubmitting?\"#CCCCCC\":isHovered?buttonHoverBackground:buttonBackground,color:isSubmitting?\"#666666\":buttonTextColor,border:\"none\",borderRadius:`${borderRadius}px`,cursor:isSubmitting?\"not-allowed\":\"pointer\",transition:\"background-color 0.2s ease\",...buttonFont},children:isSubmitting?\"Submitting...\":buttonLabel})]});}addPropertyControls(UrlInput,{inputLabel:{type:ControlType.String,title:\"Input Label\",defaultValue:\"Enter your website URL\"},roleLabel:{type:ControlType.String,title:\"Role Label\",defaultValue:\"I am a\"},roleOptions:{type:ControlType.Array,title:\"Role Options\",control:{type:ControlType.String},defaultValue:[\"Rights holder\",\"Brand\",\"Agency\"]},placeholder:{type:ControlType.String,title:\"Placeholder\",defaultValue:\"www.example.com\"},buttonLabel:{type:ControlType.String,title:\"Button Label\",defaultValue:\"Get Started\"},submitLabel:{type:ControlType.String,title:\"Submit Label\",defaultValue:\"Submit\"},source:{type:ControlType.String,title:\"Source\",defaultValue:\"landing\"},role:{type:ControlType.String,title:\"Role\",defaultValue:\"\"},prefix:{type:ControlType.String,title:\"URL Prefix\",defaultValue:\"https://\"},roleTextColor:{type:ControlType.Color,title:\"Role Text Color\",defaultValue:\"#000000\"},roleSelectedColor:{type:ControlType.Color,title:\"Role Selected Color\",defaultValue:\"#000000\"},prefixColor:{type:ControlType.Color,title:\"Prefix Text Color\",defaultValue:\"#666666\"},prefixBackground:{type:ControlType.Color,title:\"Prefix Background\",defaultValue:\"#F5F5F5\"},inputBackground:{type:ControlType.Color,title:\"Input Background\",defaultValue:\"#FFFFFF\"},inputBorder:{type:ControlType.Color,title:\"Input Border\",defaultValue:\"#EEEEEE\"},inputTextColor:{type:ControlType.Color,title:\"Input Text Color\",defaultValue:\"#000000\"},buttonBackground:{type:ControlType.Color,title:\"Button Background\",defaultValue:\"#C6FF00\"},buttonTextColor:{type:ControlType.Color,title:\"Button Text Color\",defaultValue:\"#000000\"},buttonHoverBackground:{type:ControlType.Color,title:\"Button Hover Color\",defaultValue:\"#A3CC00\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:8,min:0,max:32,step:1,unit:\"px\"},inputFont:{type:ControlType.Font,title:\"Input Font\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},buttonFont:{type:ControlType.Font,title:\"Button Font\",defaultValue:{fontSize:\"14px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},prefixFont:{type:ControlType.Font,title:\"Prefix Font\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},roleFont:{type:ControlType.Font,title:\"Role Font\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},mainGap:{type:ControlType.Number,title:\"Main Gap\",defaultValue:8,min:0,max:48,step:1,unit:\"px\"},roleGap:{type:ControlType.Number,title:\"Role Gap\",defaultValue:16,min:0,max:48,step:1,unit:\"px\"},buttonPadding:{type:ControlType.String,title:\"Button Padding\",defaultValue:\"12px 24px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"UrlInput\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./UrlInput.map"],"mappings":"+LAIG,SAAwB,EAAS,EAAM,CAAC,GAAK,CAAC,cAAY,kBAAkB,cAAY,SAAS,SAAO,WAAW,cAAY,UAAU,mBAAiB,UAAU,kBAAgB,UAAU,cAAY,UAAU,iBAAe,UAAU,mBAAiB,UAAU,kBAAgB,UAAU,wBAAsB,UAAU,eAAa,EAAE,YAAU,aAAW,aAAW,aAAW,GAAG,WAAS,QAAM,aAAW,yBAAyB,cAAY,cAAc,SAAO,UAAU,OAAK,GAAG,YAAU,SAAS,cAAY,CAAC,gBAAgB,QAAQ,SAAS,CAAC,gBAAc,UAAU,oBAAkB,UAAU,WAAS,UAAQ,EAAE,UAAQ,GAAG,gBAAc,aAAa,EAAW,CAAC,EAAW,GAAeA,EAAS,GAAG,CAAM,CAAC,EAAa,GAAiBA,EAAS,GAAM,CAAM,CAAC,EAAa,GAAiBA,EAAS,GAAG,CAAM,CAAC,E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