(window.webpackJsonp=window.webpackJsonp||[]).push([[52],{594:function(t,e,i){},718:function(t,e,i){"use strict";var a=i(594);i.n(a).a},763:function(t,e,i){"use strict";i.r(e);var a=i(219),s=i(0),l=i(3).a.extend({components:{factorBtnDashboard:a.d,factorLink:a.u,factorInputText:a.q},props:{value:{type:String,default:""},toggle:{type:Boolean,default:!1},initial:{type:String,default:""},postType:{type:String,default:""}},data:()=>({tog:!1,actual:""}),computed:{locked(){return!!this.value},permalink(){return this.value?this.value:this.initialPermalink},toggleValue(){return!(!this.tog&&!this.toggle)},initialPermalink(){return Object(s.z)(this.initial)},listeners(){return{...this.$listeners,input:t=>this.emit(t)}}},watch:{lock:function(t){t&&this.emit(t)}},mounted(){Object(s.r)("lockPermalink",()=>{this.value||this.emit(this.initialPermalink)})},methods:{getPermalink:s.j,emit(t){this.$emit("input",Object(s.z)(t))},updateFromInitial(){this.emit(this.initialPermalink)},updateToggle(t){this.$emit("update:toggle",t),this.tog=t},setToggle(){document&&(this.clickHandler=()=>{this.toggleValue&&(this.updateToggle(!1),document.removeEventListener("click",this.clickHandler,!1))},this.toggleValue?(this.updateToggle(!1),document.removeEventListener("click",this.clickHandler,!1)):(this.updateToggle(!0),this.$refs.perm.$el.focus(),document.addEventListener("click",this.clickHandler,!1)))}}}),n=(i(718),i(531)),r=Object(n.a)(l,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"permalink",on:{click:function(t){t.stopPropagation()}}},[i("div",{staticClass:"linky"},[i("factor-link",{staticClass:"linky-link",attrs:{path:t.value?t.getPermalink({postType:t.postType,permalink:t.permalink}):""}},[i("span",{staticClass:"root"},[t._v(t._s(t.getPermalink({postType:t.postType})))]),t._v(" "),t.toggleValue?t._e():i("span",{staticClass:"permalink-value"},[i("span",{staticClass:"val"},[t._v(t._s(t.permalink))])])]),t._v(" "),i("span",{directives:[{name:"show",rawName:"v-show",value:t.toggleValue,expression:"toggleValue"}],staticClass:"permalink-input"},[i("factor-input-text",t._g({ref:"perm",attrs:{value:t.value||t.permalink}},t.listeners))],1)],1),t._v(" "),t.toggleValue?t._e():i("div",{staticClass:"edit-actions"},[i("factor-btn-dashboard",{staticClass:"edit",attrs:{size:"tiny"},on:{click:function(e){return t.setToggle()}}},[t._v("Edit Permalink")]),t._v(" "),i("factor-btn-dashboard",{staticClass:"edit",attrs:{size:"tiny"},on:{click:function(e){return t.updateFromInitial()}}},[t._v("Update from Title")])],1)])}),[],!1,null,null,null);e.default=r.exports}}]);