(window.webpackJsonp=window.webpackJsonp||[]).push([[36],{464:function(e,t,r){"use strict";r.r(t);var n=r(11),c=(r(56),r(13));function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}function d(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?l(Object(source),!0).forEach((function(t){Object(n.a)(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):l(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}var o={name:"WhereInput",props:{value:{type:Object,default:()=>{}}},data:()=>({place:{},placeName:"",disableAddress:!0}),computed:d(d({},Object(c.c)(["places"])),{},{filteredPlaces(){if(!this.placeName)return this.places;var e=this.placeName.toLowerCase(),t=!1,r=this.places.filter((p=>{var r=p.name.toLowerCase(),n=p.address.toLowerCase();return r.includes(e)?(r===e&&(t=!0),!0):!!n.includes(e)}));return t||r.unshift({create:!0,name:this.placeName}),r}}),methods:{selectPlace(p){if(p){if("object"!=typeof p||p.create){this.place.name=p.name||p;var e=this.places.find((p=>p.name===this.place.name));e?(this.place.address=e.address,this.disableAddress=!0):(this.place.address="",this.disableAddress=!1,this.$refs.place.blur(),this.$refs.address.focus())}else this.place.name=p.name,this.place.address=p.address,this.disableAddress=!0;this.$emit("input",d({},this.place))}},changeAddress(e){this.place.address=e,this.$emit("input",d({},this.place))}}},m=r(6),component=Object(m.a)(o,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("v-row",[r("v-col",{attrs:{cols:"12",md:"6"}},[r("v-combobox",{ref:"place",attrs:{rules:[e.$validators.required("common.where")],label:e.$t("common.where"),hint:e.$t("event.where_description"),"search-input":e.placeName,"prepend-icon":"mdi-map-marker","persistent-hint":"",value:e.value.name,items:e.filteredPlaces,"no-filter":"","item-text":"name"},on:{"update:searchInput":function(t){e.placeName=t},"update:search-input":function(t){e.placeName=t},change:e.selectPlace},scopedSlots:e._u([{key:"item",fn:function(t){var n=t.item;return[n.create?r("v-list-item-content",{attrs:{"two-line":""}},[r("v-list-item-title",[r("v-icon",{attrs:{color:"primary"}},[e._v("mdi-plus")]),e._v(" "+e._s(n.name))],1)],1):r("v-list-item-content",{attrs:{"two-line":""}},[r("v-list-item-title",[e._v(e._s(n.name))]),r("v-list-item-subtitle",[e._v(e._s(n.address))])],1)]}}])})],1),r("v-col",{attrs:{cols:"12",md:"6"}},[r("v-text-field",{ref:"address",attrs:{"prepend-icon":"mdi-map",disabled:e.disableAddress,rules:[function(t){return!!e.disableAddress||e.$validators.required("common.address")(t)}],label:e.$t("common.address"),value:e.value.address},on:{change:e.changeAddress}})],1)],1)}),[],!1,null,null,null);t.default=component.exports}}]);