import{S as l,B as u}from"./Editor.2fd4385f.js";import{n as i}from"./vueComponentNormalizer.87056a83.js";import{C as c}from"./UnfilteredHtml.f98679bb.js";var d=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"aioseo-add-template-tag"},[n("svg-plus"),t._t("default")],2)},_=[];const g={components:{SvgPlus:l}},a={};var f=i(g,d,_,!1,p,null,null,null);function p(t){for(let e in a)this[e]=a[e]}var m=function(){return f.exports}(),v=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"aioseo-html-tags-editor"},[t.checkUnfilteredHtml?n("core-alert-unfiltered-html"):t._e(),t.disabled?t._e():n("div",[t.showTags&&t.allowTags&&t.tagsDescription.length?n("div",{staticClass:"aioseo-description tags-description"},[t._t("tags-description",function(){return[t._v(" "+t._s(t.tagsDescription)+" ")]})],2):t._e(),t.showTags&&t.allowTags?n("div",{staticClass:"add-tags"},[t._l(t.filteredTags,function(s,o){return n("core-add-template-tag",{key:o,nativeOn:{click:function(C){return t.insertTag(s.id)}}},[t._v(" "+t._s(s.name)+" ")])}),t.showAllTagsLink?n("a",{staticClass:"aioseo-view-all-tags",attrs:{href:"#"},on:{click:function(s){return s.preventDefault(),t.insertTag()}}},[t._v(" "+t._s(t.strings.allTags)+"\xA0\u2192 ")]):t._e()],2):t._e()]),n("base-editor",{ref:"editor",attrs:{value:t.value,"allow-tags":t.allowTags,"line-numbers":t.lineNumbers,single:t.single,disabled:t.disabled,"minimum-line-numbers":t.minimumLineNumbers,"tags-context":t.tagsContext,"default-menu-orientation":t.defaultMenuOrientation,description:t.description},on:{input:function(s){return t.$emit("input",s)},counter:function(s){return t.$emit("counter",s)}}})],1)},h=[];const T={components:{BaseEditor:u,CoreAddTemplateTag:m,CoreAlertUnfilteredHtml:c},props:{single:Boolean,lineNumbers:{type:Boolean,default(){return!0}},minimumLineNumbers:{type:Number,default(){return 13}},allowTags:{type:Boolean,default(){return!0}},showTags:{type:Boolean,default(){return!0}},showAllTagsLink:{type:Boolean,default(){return!0}},defaultTags:Array,value:{type:String,default:""},tagsContext:String,defaultMenuOrientation:String,description:Boolean,tagsDescription:{type:String,default(){return"Click on the tags below to insert variables into your template."}},checkUnfilteredHtml:{type:Boolean,default(){return!1}},disabled:{type:Boolean,default(){return this.checkUnfilteredHtml&&!this.$aioseo.user.unfilteredHtml}}},data(){return{strings:{allTags:"View all tags"}}},computed:{filteredTags(){const t=this.tagsContext?this.$tags.context(this.tagsContext):this.$aioseo.tags.tags;return this.defaultTags?this.defaultTags.map(e=>t.find(n=>n.id===e)).filter(e=>e):t.filter(e=>!e.deprecated).slice(0,3)}},methods:{insertTag(t){this.$refs.editor.insertTag(t)}}},r={};var y=i(T,v,h,!1,x,null,null,null);function x(t){for(let e in r)this[e]=r[e]}var B=function(){return y.exports}();export{B as C};
