1import{K,c as W,bi as z,b2 as Q,a2 as Y,bm as J,a0 as X,bk as Z,bl as ee,b$ as ae,bn as te,bj as le,p as h,q as T,s as o,ae as ie,ap as se,Q as $,ag as A,M as q,o as a,y as m,R as ne,af as c,an as oe,bU as re,m as w,a5 as me}from"./DOiwsT-c.js";import{A as ce}from"./DWdte318.js";import{A as b}from"./BOgB_CnL.js";import{P as de,F as ue}from"./Dj7ip30y.js";import"./BQESNVCW.js";import"./9E11z-DD.js";import"./DED-h79g.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};i.SENTRY_RELEASE={id:"1.0.129"};var p=new i.Error().stack;p&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[p]="96349f8f-0018-48a3-891c-ff71c83b49a9",i._sentryDebugIdIdentifier="sentry-dbid-96349f8f-0018-48a3-891c-ff71c83b49a9")}catch{}})();const pe={class:"part"},_e={class:"toggle"},fe={class:"subtitle"},he={class:"part"},be={class:"row"},ge=K({inheritAttrs:!1,__name:"SubmitForm",props:{loading:{type:Boolean,default:!1},email:{default:""},apiErrorMessages:{}},emits:["reset","submit"],setup(i,{emit:p}){const g=i,k=p,{t:s}=W(),M=re(),C=z(),D=w(()=>g.email.trim().length>0),V=w(()=>C.ipInfo.iso_code),N=Q("technical-specialist-phone"),d=Y().trim().max(128,({max:e})=>s("Validations.max",{length:e})),U=d.matches(J,s("Validations.Invalid_email_address")).companyEmail(s("Validations.Invalid_corporate_email")).email(s("Validations.Invalid_email_address")),P=e=>d.test({message:s("Validations.Invalid_phone"),test:()=>e.value?.isValid()}),u=e=>e.required(s("Validations.This_field_is_required")).defined(),_={ENTRA_ID:"Entra ID",GOOGLE_WORKSPACE:"Google Workspace",OTHER:"Other"},R=Object.values(_),B=X({iam:ae().nullable().test({message:s("Validations.This_field_is_required"),test:e=>R.includes(e)}).default(null),iam_name:d.when("iam",{is:_.OTHER,then:u,otherwise:e=>e.optional()}),technical_specialist_firstname:u(d),technical_specialist_lastname:u(d),technical_specialist_email:u(U),technical_specialist_phone:u(P(N)).default(""),gdpr:Z().test({message:s("Validations.This_field_is_required"),test:e=>ee.includes(V.value)?e:!0}).default(!1)}),{defineField:n,handleSubmit:L,meta:H,errors:r,resetField:x}=te({validationSchema:le(B),initialValues:{technical_specialist_email:g.email||""}}),[f]=n("iam"),[y]=n("iam_name"),[I]=n("technical_specialist_firstname"),[v]=n("technical_specialist_lastname"),[S]=n("technical_specialist_email"),[E]=n("technical_specialist_phone"),[F]=n("gdpr"),G=e=>{f.value=f.value===e?null:e,x("iam_name",{value:"",errors:[],touched:!1})},j=(e,t)=>`${e?.trim()||""} ${t?.trim()||""}`.trim(),O=L(e=>{const t={iam_name:e.iam===_.OTHER?e.iam_name:e.iam||"",technical_specialist_fullname:j(e.technical_specialist_firstname,e.technical_specialist_lastname),technical_specialist_email:e.technical_specialist_email||"",technical_specialist_phone:e.technical_specialist_phone||""};k("submit",t)});return(e,t)=>(h(),T("form",{"data-component-name":"Forms.FleetManager.SubmitForm",onSubmit:t[6]||(t[6]=(...l)=>a(O)&&a(O)(...l))},[o("div",pe,[t[7]||(t[7]=o("strong",{class:"subtitle"},"Select your IAM system:*",-1)),o("div",_e,[(h(!0),T(ie,null,se(a(R),l=>(h(),$(ce,{key:l,"model-value":a(f)===l,id:`iam-option-${l.toLowerCase().replace(/\s+/g,"-")}`,"onUpdate:modelValue":Ve=>G(l)},{default:A(()=>[o("span",fe,q(l),1)]),_:2},1032,["model-value","id","onUpdate:modelValue"]))),128))]),a(f)===_.OTHER?(h(),$(b,{key:0,modelValue:a(y),"onUpdate:modelValue":t[0]||(t[0]=l=>m(y)?y.value=l:null),error:a(r).iam_name,label:e.$t("Forms.FleetManager.SubmitForm.iam-name"),required:""},null,8,["modelValue","error","label"])):ne("",!0)]),o("div",he,[o("div",be,[c(b,{modelValue:a(I),"onUpdate:modelValue":t[1]||(t[1]=l=>m(I)?I.value=l:null),label:e.$t("First_Name"),error:a(r).technical_specialist_firstname,required:"",type:"text"},null,8,["modelValue","label","error"]),c(b,{modelValue:a(v),"onUpdate:modelValue":t[2]||(t[2]=l=>m(v)?v.value=l:null),label:e.$t("Last_Name"),error:a(r).technical_specialist_lastname,required:"",type:"text"},null,8,["modelValue","label","error"])]),c(b,{modelValue:a(S),"onUpdate:modelValue":t[3]||(t[3]=l=>m(S)?S.value=l:null),label:e.$t("Corporate_Email"),error:a(r).technical_specialist_email,disabled:a(D),required:"",type:"email"},null,8,["modelValue","label","error","disabled"]),c(de,{modelValue:a(E),"onUpdate:modelValue":t[4]||(t[4]=l=>m(E)?E.value=l:null),ref:"technical-specialist-phone",error:a(r).technical_specialist_phone,"country-i-s-o":a(V),required:"",size:"medium"},null,8,["modelValue","error","country-i-s-o"])]),c(a(ue).GDPR,{modelValue:a(F),"onUpdate:modelValue":t[5]||(t[5]=l=>m(F)?F.value=l:null),error:a(r).gdpr,"country-i-s-o":a(V)},null,8,["modelValue","error","country-i-s-o"]),c(a(oe).Regular,{disabled:!a(M)||!a(H).valid||i.loading,accent:"purple",type:"submit","trailing-icon":"arrow-right"},{default:A(()=>[o("span",null,q(e.$t("Submit")),1)]),_:1},8,["disabled"])],32))}}),Oe=me(ge,[["__scopeId","data-v-428641a0"]]);export{Oe as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.