1var p=Object.defineProperty;var m=(a,t,e)=>t in a?p(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var o=(a,t,e)=>m(a,typeof t!="symbol"?t+"":t,e);import{_ as h,V as i,A as u,a as f,g as _,m as d,n as b}from"./BpVbTKW6.main.js";var v=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=(a,t,e,s)=>{for(var r=s>1?void 0:s?C(t,e):t,l=a.length-1,n;l>=0;l--)(n=a[l])&&(r=(s?n(t,e,r):n(r))||r);return s&&r&&v(t,e,r),r};let c=class extends i{constructor(){super(...arguments);o(this,"attach");o(this,"show",!1);o(this,"properties",null);o(this,"submitLoading",!1);o(this,"model",{cardOwnerId:"",cardId:""})}beforeMount(){this.properties=this.attach}resetModel(){this.model={cardOwnerId:"",cardId:""}}get submitDisabled(){return this.model.cardOwnerId===""||this.model.cardId===""||this.submitLoading}attachCard(){this.model&&(this.submitLoading=!0,u.attachAdmissionCard(this.model).then(({status:e})=>{e==200&&(f.$emit(_.AdmissionCardUserAttach),this.handleModalClose(),d.success(i.filter("translate")("WebshopAdmissionCardAttachSuccess"),4e3))}).catch(e=>{const{data:s}=e.response;e.response.status==404?d.danger(i.filter("translate")("WebshopAdmissionCardErrorNotFound"),4e3):e.response.status==422&&(s.code=="AdmissionCardBlocked"?d.danger(i.filter("translate")("WebshopAdmissionCardAttachBlockedError"),4e3):d.danger(i.filter("translate")("WebshopErrorCode"+s.code),4e3))}).finally(()=>{this.submitLoading=!1}))}handleModalClose(){this.show=!1,this.resetModel()}};c=w([h({props:{attach:Object}})],c);var g=function(){var t=this,e=t._self._c;return t._self._setupProxy,t.properties&&t.properties.attachEnabled?e("section",{staticClass:"relative pt-8 border-t border-t-neutral-200",attrs:{id:"attach"}},[t._m(0),e("div",{staticClass:"block",class:{"justify-end":!t.properties.attachIntroText||t.properties.attachIntroText==""}},[t.properties.attachIntroText?e("div",{domProps:{innerHTML:t._s(t.properties.attachIntroText)}}):t._e(),t.properties.attachButtonText?e("button",{staticClass:"button primary small outlined gap-2 !px-3 !py-2 mt-6 lg:mt-8",on:{click:function(s){t.show=!t.show}}},[e("svg",{staticClass:"w-6 h-6",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"}},[e("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"}})]),t._v(" "+t._s(t.properties.attachButtonText)+" ")]):t._e()]),e("modal",{ref:"attach-card-modal",attrs:{"custom-class":"theme-white",show:t.show},on:{close:t.handleModalClose}},[e("template",{slot:"header"}),e("template",{slot:"body"},[t.properties.attachText?e("p",{domProps:{innerHTML:t._s(t.properties.attachText)}}):t._e(),e("form",{ref:"attachForm",staticClass:"mt-4",on:{submit:function(s){return s.preventDefault(),t.attachCard()}}},[e("div",{staticClass:"grid grid-cols-1 gap-6"},[e("label",{staticClass:"field"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.model.cardOwnerId,expression:"model.cardOwnerId"}],attrs:{type:"text",placeholder:" ",required:"",disabled:t.submitLoading},domProps:{value:t.model.cardOwnerId},on:{input:function(s){s.target.composing||t.$set(t.model,"cardOwnerId",s.target.value)}}}),e("span",{attrs:{placeholder:""}},[t._v(t._s(t._f("translate")("WebshopAdmissionCardAttachCardOwnerId")))])]),e("label",{staticClass:"field"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.model.cardId,expression:"model.cardId"}],attrs:{type:"text",placeholder:" ",required:"",disabled:t.submitLoading},domProps:{value:t.model.cardId},on:{input:function(s){s.target.composing||t.$set(t.model,"cardId",s.target.value)}}}),e("span",{attrs:{placeholder:""}},[t._v(t._s(t._f("translate")("WebshopAdmissionCardAttachCardId")))])])]),e("div",{staticClass:"flex items-end justify-end w-full mt-6"},[e("button",{staticClass:"button primary contained !m-0 w-full sm:w-auto",attrs:{type:"submit",disabled:t.submitDisabled||t.submitLoading}},[t.submitLoading?e("loader",{attrs:{size:"extra-small",theme:"light"}}):!t.submitLoading&&t.properties.attachButtonText?[t._v(" "+t._s(t.properties.attachButtonText)+" ")]:[t._v(" "+t._s(t._f("translate")("WebshopGeneralSave"))+" ")]],2)])])])],2)],1):t._e()},x=[function(){var a=this,t=a._self._c;return a._self._setupProxy,t("div",{staticClass:"absolute top-0 left-0 right-0 flex items-center",attrs:{"aria-hidden":"true"}},[t("div",{staticClass:"w-full border-t border-neutral"})])}],I=b(c,g,x,!1,null,null);const y=I.exports;export{y 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.