1import{_ as f}from"./Screen-ClLks0_F.js";import{_ as h}from"./FacilForm-OId_xhJ9.js";import{_ as g}from"./Card-J7AKWS6F.js";import{_ as v,a as y,A as b}from"./index-BFSojNnq.js";import{_ as w}from"./FacilText-0n0p_61V.js";import{n as I}from"./Navigator-nquAwlj6.js";import{o as E,e as S,w as o,J as s,Q as i,cX as x,N as l,cV as L}from"./vendor-DbLbO5op.js";import"./ScreenHeaderBar-D4wc0l2z.js";import"./device-BsPl6oaQ.js";import"./FacilAccordionPanel-C-6hTxsu.js";import"./dom-DV8nAVoD.js";import"./FacilLoader-BGI1stku.js";import"./FacilSelectJSX.vue_vue_type_script_lang-CMRpJHGs.js";import"./FacilSelect-BEaJWnTs.js";import"./FacilChip-CkezwtHD.js";import"./FacilDivider-7y7XM-7d.js";import"./debounce-C1VrBHvk.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"kqhew@[email protected]"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6752efd0-2394-495a-9723-d6e299482753",e._sentryDebugIdIdentifier="sentry-dbid-6752efd0-2394-495a-9723-d6e299482753")}catch{}})();const V={name:"EInvoiceEmailSubmissionLegacy",mixins:[I],props:{currentState:{type:Object,default:()=>({})}},data(){return{email:""}},computed:{pos(){return b()},orderId(){return this.pos.orderState.data.order.id},customerEmail(){return this.pos.cart.customer.email},headerBar(){return{title:this.$tt("pos.apps.e_invoice_malaysia.title"),leftAction:{icon:"chevron_left",onAction:()=>{this.navigatorPop()}}}}},mounted(){this.customerEmail&&(this.email=this.customerEmail)},methods:{emailInvoice(){this.setLoading().then(()=>this.$refs.form.validate()).then(e=>{e?this.$api.order.sendEInvoice(this.orderId,{email:this.email}).then(t=>{console.log("email",t),this.showToastr({message:this.$tt("pos.email_receipt_desc",{value:this.email})}),this.navigatorPop()}).catch(t=>this.errorHandler(t)).finally(()=>{this.setLoading(!1)}):this.setLoading(!1)})}}},$={class:"lg:w-11/12 xl:w-10/12 lg:self-center"},k={class:"space-y-5"},B={class:"screen-text-large font-500"};function T(e,t,m,D,n,a){const d=w,c=y,p=g,u=h,_=f;return E(),S(_,{"header-bar":a.headerBar},{default:o(()=>[s("div",$,[i(u,{ref:"form",onSubmit:t[1]||(t[1]=x(r=>a.emailInvoice(),["prevent"]))},{default:o(()=>[i(p,{medium:""},{default:o(()=>[s("div",k,[s("h3",B,l(e.$tt("order.invoice.email")),1),i(d,{modelValue:n.email,"onUpdate:modelValue":t[0]||(t[0]=r=>n.email=r),name:"email",rules:{email:!0,required:!0},placeholder:e.$tt("order.invoice.email"),size:"xl"},null,8,["modelValue","placeholder"]),i(c,{"loading-style":"pos",type:"primary",size:"xl",class:"w-full",loading:e.isLoading(),onClick:a.emailInvoice},{default:o(()=>[L(l(e.$tt("pos.apps.e_invoice_malaysia.send")),1)]),_:1},8,["loading","onClick"])])]),_:1})]),_:1},512)])]),_:1},8,["header-bar"])}const G=v(V,[["render",T]]);export{G 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.