1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[12085],{12085:(t,e,n)=>{n.r(e),n.d(e,{default:()=>r});var a=n(97179),s=n(60185);const i={name:"SetLanguages",mixins:[a.e,s.G],data:function(){return{translations:[],selectedLang:"",langOptions:[],action:"set_language",price:0,type:"",text:"",key:"",isCustom:!1}},computed:{appLang:function(){return store.state.laravel.appLocale},initData:function(){return store.state.layout.initData}},watch:{text:function(t){var e=this;if(t){var n=this.translations.find((function(t){return t.lang==e.selectedLang}));n?n.translation=JSON.stringify({title:this.text}):this.translations.push({lang:this.selectedLang,translation:JSON.stringify({title:this.text})})}}},mounted:function(){var t=this;alert.$on("open-set-user-price-languages-modal",(function(e){t.translations=e.translations,t.type=e.type,t.key=e.key,t.selectedLang=t.appLang,e.is_custom&&(t.isCustom=!0,t.price=e.price);var n=t.translations.find((function(e){return e.lang==t.selectedLang}));n&&(t.text=JSON.parse(n.translation).title),t.$bvModal.show("setUserPriceLanguages")})),alert.$on("open-create-guest-price-modal",(function(){t.action="create",t.selectedLang=t.appLang,t.$bvModal.show("setUserPriceLanguages")}))},created:function(){this.langOptions=0===this.initData.group.languages.length?this.getAvailableLanguagesWithTranslations():this.initData.group.languages},methods:{changeLang:function(){var t=this,e=this.translations.find((function(e){return e.lang==t.selectedLang}));this.text=e?JSON.parse(e.translation).title:""},saveChanges:function(){var t={};if("create"===this.action||this.isCustom){t.price=this.price,t.enabled=!0,t.languages=this.translations;var e=this.text;if(this.translations&&Object.keys(this.translations).length){var n=this.translations.find((function(t){return"en"===t.lang}));n&&(e=JSON.parse(n.translation).title)}var a=e.split(" ");t.type=a[0].toLowerCase(),t.is_custom=!0,this.isCustom&&(t.update=!0)}else t.translations=this.translations,t.type=this.type,t.key=this.key;this.$emit("setTranslations",t),this.$bvModal.hide("setUserPriceLanguages")},hidden:function(){this.translations=[],this.type="",this.text="",this.key="",this.price=0}}};const r=(0,n(14486).A)(i,(function(){var t,e,n,a=this,s=a._self._c;return s("b-modal",{attrs:{id:"setUserPriceLanguages","hide-footer":"","hide-header":"","body-class":"border-radius-medium"},on:{hidden:a.hidden}},[s("div",[s("div",{staticClass:"modal-content"},[s("div",{staticClass:"header-section"},[s("a",{staticClass:"fa fa-times pull-right pointer color-light-blue",on:{click:function(t){return a.$bvModal.hide("setUserPriceLanguages")}}}),a._v(" "),s("select",{directives:[{name:"model",rawName:"v-model",value:a.selectedLang,expression:"selectedLang"}],staticClass:"form-control-language pull-right",on:{change:[function(t){var e=Array.prototype.filter.call(t.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));a.selectedLang=t.target.multiple?e:e[0]},function(t){return a.changeLang()}]}},a._l(a.langOptions,(function(t){return s("option",{key:t.lang,domProps:{value:t.lang}},[a._v("\n "+a._s(t.name)+"\n ")])})),0)])]),a._v(" "),s("div",{staticClass:"modal-body mx-height-500"},[s("div",{staticClass:"col-container full-item flex"},[s("input",{directives:[{name:"model",rawName:"v-model",value:a.text,expression:"text"}],staticClass:"form-control-new wide-mobile strip-margin w-100",attrs:{type:"text",dusk:"event-title-field",name:"title",placeholder:a.localLangs.main.write_something_invite},domProps:{value:a.text},on:{input:function(t){t.target.composing||(a.text=t.target.value)}}}),a._v(" "),"create"===a.action||a.isCustom?s("label",{staticClass:"form-control-new flex align-items-center strip-margin margin-left",staticStyle:{padding:"0 15px 0 0"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:a.price,expression:"price"}],staticClass:"form-control-new",attrs:{type:"number",min:"0",step:"1","data-number-to-fixed":"2","data-number-stepfactor":"100",placeholder:a.localLangs.main.price,name:"price"},domProps:{value:a.price}
1,on:{input:function(t){t.target.composing||(a.price=t.target.value)}}}),a._v(" "),s("span",{staticClass:"pull-right"},[a._v("\n "+a._s(a.mixinDisplayCurrency(null===(t=a.initData)||void 0===t||null===(e=t.group)||void 0===e||null===(n=e.address)||void 0===n?void 0:n.currency))+"\n ")])]):a._e()])]),a._v(" "),s("div",{staticClass:"modal-footer text-center"},[s("button",{staticClass:"btn-new btn-large btn-light-grey pull-left",attrs:{type:"button"},on:{click:function(t){return a.$bvModal.hide("setUserPriceLanguages")}}},[a._v("\n "+a._s(a.localLangs.webshop.cancel)+"\n ")]),a._v(" "),s("button",{staticClass:"btn-new btn-large btn-dark-green pull-right",attrs:{type:"button"},on:{click:function(t){return a.saveChanges()}}},[s("span",[a._v("\n "+a._s(a.localLangs.webshop.save)+"\n ")])])])])])}),[],!1,null,"a2d18150",null).exports}}]);
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.