1import{r as e,t as l}from"./CGnUn3g1.js";import{$t as a,Dn as n,Ln as t,Un as s,Vt as i,an as o,ar as c,cn as r,dn as d,er as u,ir as m,mn as p,n as h,qn as f,rr as v,sn as g,t as y,un as b}from"./CgAueAPK.js";var x=e(l()),k={class:"field is-horizontal"},$={class:"field-body"},w={class:"field"},M={class:"control has-icons-right"},V={key:0,class:"help is-danger"},_={class:"field"},z={class:"control has-icons-right"},U={key:0,class:"help is-danger"},C={class:"field"},D={class:"control has-icons-right"},H={key:0,class:"help is-danger"},T={class:"field is-horizontal mt-5"},Y={class:"field-body"},j={class:"field"},q={class:"control has-icons-right"},N={key:0,class:"help is-danger"},E={class:"media-left"},F={class:"media-content"},B={class:"content"},G={key:0},J={class:"field is-horizontal mt-5"},L={class:"field-body"},O={class:"field"},P={class:"control"},R={__name:"MainCourseForm",setup(e){const{$copy:l,$find:y,$empty:R,$errPhone:S,$errEmail:A,$insertapi:I,$resetNull:K,$getdata:Q}=i();var W=f({fullname:null,phone:null,email:null,note:null}),X=f([]),Z=f(null),ee=async function(){if(function(){let e=[];R(W.value.fullname)&&e.push({name:"fullname",text:"Há» và tên không ÄÆ°á»£c bá» trá»ng."});let l=S(W.value.phone);return l&&e.push({name:"phone",text:l}),l=A(W.value.email),l&&e.push({name:"email",text:l}),X.value=e,e.length>0}())return;if(W.value.content=window.location.href,"error"===await I("register",K(W.value)))return Z.value={success:!1,icon:"error.svg",type:"danger",content:"Äã xảy ra lá»i. Vui lòng thá» lại hoặc liên há» hotline Äá» ÄÆ°á»£c trợ giúp. Trân trá»ng cảm Æ¡n sá»± tin tưá»ng cá»§a quý khách.",color:"red"},void(W.value={fullname:null,phone:null,email:null,note:null});let e="BigDataTech Äã tiếp nháºn ÄÄng ký cá»§a bạn. Chúng tôi sẽ phản há»i trong thá»i gian sá»m nhất. Trân trá»ng cảm Æ¡n sá»± tin tưá»ng cá»§a quý khách.";Z.value={success:!0,content:e,icon:"check2.svg",type:"primary",color:"#019a48"};let a=await Q("datastory",JSON.stringify({tags__contains:"register-course"}),void 0,!0),n=y(a.content[0].data,{name:"comment"},"data");e=l(n.text),e=e.replace("[1]",W.value.fullname),e=e.replace("[2]",W.value.phone),e=e.replace("[3]",W.value.email),e=e.replace("[4]",W.note||""),e=e.replace("[5]",window.location.href),e=e.replace("[6]",(0,x.default)().format("DD/MM/YYYY HH:MM")),e=e.replace("[7]",window.location.href);let t={to:"[email protected]",content:e,subject:`ÄÄng ký khóa há»c từ ${W.value.fullname} - ${W.value.phone}`};I("sendemail",t),W.value={fullname:null,phone:null,email:null,note:null}};return(e,l)=>{const i=h;return n(),r("div",null,[l[11]||(l[11]=o("p",{class:"fsb-18 mb-5 pt-2"},"Nếu bạn muá»n tham gia khóa Äà o tạo cá»§a chúng tôi, vui lòng ghi danh tại Äây",-1)),o("div",k,[o("div",$,[o("div",w,[l[6]||(l[6]=o("label",{class:"label",for:"fullname"},[b("Há» tên"),o("span",{class:"has-text-danger ml-1"},"*")],-1)),o("div",M,[t(o("input",{class:"input",type:"text",placeholder:"","onUpdate:modelValue":l[0]||(l[0]=e=>u(W).fullname=e),id:"fullname"},null,512),[[a,u(W).fullname]])]),u(X).find(e=>"fullname"===e.name)?(n(),r("p",V,c(u(X).find(e=>"fullname"===e.name).text),1)):g("",!0)]),o("div",_,[l[7]||(l[7]=o("label",{class:"label",for:"phone"},[b("Äiá»n thoại"),o("span",{class:"has-text-danger ml-1"},"*")],-1)),o("div",z,[t(o("input",{class:"input",type:"text",placeholder:"","onUpdate:modelValue":l[1]||(l[1]=e=>u(W).phone=e),id:"phone"},null,512),[[a,u(W).phone]])]),u(X).find(e=>"phone"===e.name)?(n(),r("p",U,c(u(X).find(e=>"phone"===e.name).text),1)):g("",!0)]),o("div",C,[l[8]||(l[8]=o("label",{class:"label",for:"email"},[b("Email"),o("span",{class:"has-text-danger ml-1"},"*")],-1)),o("div",D,[t(o("input",{class:"input",type:"text",placeholder:"","onUpdate:modelValue":l[2]||(l[2]=e=>u(W).email=e),id:"email"},null,512),[[a,u(W).email]])]),u(X).find(e=>"email"===e.name)?(n(),r("p",H,c(u(X).find(e=>"email"===e.name).text),1)):g("",!0)])])]),o("div",T,[o("div",Y,[o("div",j,[l[9]||(l[9]=o("label",{class:"label",for:"note"},"Ghi chú",-1)),o("div",q,[t(o("textarea",{class:"textarea",placeholder:"",rows:"3","onUpdate:modelValue":l[3]||(l[3]=e=>u(W).note=e),id:"note"},null,512),[[a,u(W).note]])]),u(X).find(e=>"note"===e.name)?(n(),r("p",N,c(u(X).find(e=>"note"===e.name).text),1)):g("",!0)])])]),u(Z)?(n(),r("article",{key:0,class:"media px-3 py-3 mt-5",style:m(`border-radius:6px; border:1px solid ${u(Z).color};`),onClick:l[4]||(l[4]=e=>s(Z)?Z.value=null:Z=null)},[o("figure",E,[d(i,v(p({name:u(Z).icon,type:u(Z).type,size:40,alt:"Thông báo"})),null,16)]),o("div",F,[o("div",B,[u(Z)?(n(),r("p",G,c(u(Z).content),1)):g("",!0)])]),l[10]||(l[10]=o("div",{class:"media-right"},[o("button",{class:"delete"})],-1))],4)):g("",!0),o("div",J,[o("div",L,[o("div",O,[o("div",P,[o("button",{class:"button is-dark",onClick:l[5]||(l[5]=e=>u(ee)())}," ÄÄng ký ")])])])])])}}},S={class:"mb-6"},A={class:"columns is-multiline mx-0"},I={class:"column pt-0 px-0 is-7-desktop"},K={__name:"MainRegisterForm",setup:e=>(e,l)=>{const a=y;return n(),r("div",null,[o("div",S,[d(a,v(p({title:"ÄÄng ký",size:36,type:"has-text-black"})),null,16)]),o("div",A,[o("div",I,[d(u(R))])])])}};export{K as t};
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.