1import{_ as E}from"./DkvFmmUL.js";import{d as S,l as g,p as _,s as n,a1 as V,c as b,B as N,o as y,a as B,C as F,u as s,a2 as M,a8 as k}from"./ByqeUdnM.js";import{u as q}from"./BCxV-9YS.js";import{c as m,r as x,e as Y,u as C}from"./CcZSC9Cj.js";const T=S({__name:"NewsletterEmailForm",props:{placeholder:{type:String,default:""},location:{type:String,default:"footer"}},setup(i){const t=i,u=g(),c=_(),p=q(),f=n(!1),a=n(t.placeholder),o=V({emailAddress:""}),v=()=>{k(()=>{a.value="Enter Your Email"})},h=()=>{o.emailAddress||(a.value=t.placeholder)},w=b(()=>({emailAddress:{required:m.withMessage("Email address required",x),emailValidation:m.withMessage("Enter a valid email address",Y)}})),e=C(w,o);N(()=>o.emailAddress,r=>{(r===""||e.value.$invalid)&&e.value.$reset(),r&&a.value!=="Enter Your Email"?a.value="Enter Your Email":!r&&!f.value&&(a.value=t.placeholder)});const $=()=>{e.value.$touch(),e.value.$invalid||c.updateNotificationModal(u.modalNewsletter,"footer"),p.step1Data.emailAddress=o.emailAddress};return(r,d)=>{const A=E;return y(),B("form",{novalidate:"",onSubmit:M($,["prevent"])},[F(A,{modelValue:s(e).emailAddress.$model,"onUpdate:modelValue":d[0]||(d[0]=l=>s(e).emailAddress.$model=l),"allow-submit":!0,"el-style":"newsletter","err-message":s(e).emailAddress.$error?r.$t(s(e).emailAddress.$errors.map(l=>l.$message).toString()):"","has-err":s(e).emailAddress.$error,placeholder:s(a),"submit-icon":i.location==="footer"?"arrow":"",type:"email",onBlur:h,onFocus:v},null,8,["modelValue","err-message","has-err","placeholder","submit-icon"])],32)}}});export{T as _};
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.