import{B as a}from"./HighlightToggle.47bdd2a8.js";import{C as l}from"./Index.c7d3532f.js";import{C as p}from"./Tooltip.674a9fb4.js";import{G as u,a as c}from"./Row.13b6f3f1.js";import{n as d}from"./vueComponentNormalizer.87056a83.js";var _=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"aioseo-post-type-options-toggle"},[e("div",{staticClass:"post-type-options-settings"},[t.postTypes.length===0&&t.type==="postTypes"?e("core-alert",{attrs:{type:"blue"}},[e("strong",[t._v(t._s(t.strings.noPostTypes))]),t._v(" "+t._s(t.strings.noPostTypesDescription)+" ")]):t._e(),t.postTypes.length===0&&t.type==="taxonomies"?e("core-alert",{attrs:{type:"blue"}},[e("strong",[t._v(t._s(t.strings.noTaxonomies))]),t._v(" "+t._s(t.strings.noTaxonomiesDescription)+" ")]):t._e(),0<t.postTypes.length?e("grid-row",t._l(t.postTypes,function(s,i){return e("grid-column",{key:i,attrs:{md:"6"}},[e("base-highlight-toggle",{attrs:{size:"medium",active:t.isActive(s),name:s.name,type:"checkbox",value:t.getValue(s)},on:{input:function(r){return t.updateValue(r,s)}}},[e("core-tooltip",{scopedSlots:t._u([{key:"tooltip",fn:function(){return[e("div",{staticClass:"aioseo-description"},[t._v(" "+t._s(t.strings.label)+" "),e("strong",[t._v(t._s(s.label))]),e("br"),t._v(" "+t._s(t.strings.name)+" "),e("strong",[t._v(t._s(s.name))])])]},proxy:!0}],null,!0)},[e("span",{staticClass:"icon dashicons",class:""+(s.icon||"dashicons-admin-post")})]),t._v(" "+t._s(s.label)+" ")],1)],1)}),1):t._e()],1)])},m=[];const y={components:{BaseHighlightToggle:a,CoreAlert:l,CoreTooltip:p,GridColumn:u,GridRow:c},props:{type:{type:String,required:!0},options:{type:Object,required:!0},excluded:{type:Array,default(){return[]}}},data(){return{strings:{label:"Label:",name:"Slug:",noPostTypes:"No post types available.",noTaxonomies:"No taxonomies available.",noPostTypesDescription:"All post types are set to noindex or your site does not have any post types registered that are supported by this feature.",noTaxonomiesDescription:"All taxonomies are set to noindex or your site does not have any taxonomies registered that are supported by this feature."}}},computed:{postTypes(){return this.$aioseo.postData[this.type].filter(t=>!this.excluded.includes(t.name))}},methods:{emitInput(t){this.$emit("input",t)},updateValue(t,n){if(t){const s=this.options[this.type].included;s.push(n.name),this.$set(this.options[this.type],"included",s);return}const e=this.options[this.type].included.findIndex(s=>s===n.name);e!==-1&&this.$delete(this.options[this.type].included,e)},getValue(t){return this.options[this.type].included.includes(t.name)},isActive(t){return this.options[this.type].included.findIndex(e=>e===t.name)!==-1}}},o={};var h=d(y,_,m,!1,g,null,null,null);function g(t){for(let n in o)this[n]=o[n]}var C=function(){return h.exports}();export{C};
