import{J as g,x as y,g as E,U as e,T as c,aM as P,V as S}from"./Dk4AzF7j.js";import{c as u}from"./NkNhW2e0.js";const C=()=>{const{t,te:p}=g(),f=r=>{if(!r.suggestion)return r.name;const{suggestion:{identifier:m},name:a}=r;if(!m)return a;const i=`admin.components.names.${m}`;return p(i)?t(i):a},s=y(),n=E(()=>{if(!s.currentProject?.system.domain)return{protocol:"https",domain:"domain.com"};const r=s.currentProject?.system.domain.split("://");return{protocol:r[0]||"https",domain:r[1]||"domain.com"}}),d=e().optional().refine(r=>r?r.startsWith("http://")||r.startsWith("https://"):!0,{message:t("formErrors.invalidProtocol")}).refine(r=>r?u(r,n.value.domain):!0,{message:t("formErrors.mustContainDomain",{domain:n.value.domain})}),o=e().refine(r=>r.startsWith("http://")||r.startsWith("https://"),{message:t("formErrors.invalidProtocol")}).refine(r=>u(r,n.value.domain),{message:t("formErrors.mustContainDomain",{domain:n.value.domain})}),h=c({name:e().min(3,t("formErrors.min",{min:3})).transform(r=>S(r)),url:o,type:P().min(1,t("formErrors.empty",{name:"Type"}))}),l=c({url:o});return{pageComponentName:f,longSchema:h,shortSchema:l,baseDomain:n,zUrlSchema:o,zBaseUrlSchema:d}};export{C as u};
