import{b as P}from"./index.6205915e.js";import{B as k}from"./HighlightToggle.cd602d8b.js";import{C as A}from"./Index.92195ca4.js";import{G as C,a as B}from"./Row.8a74cb5b.js";import"./translations.e71e2202.js";import{_ as D}from"./_plugin-vue_export-helper.eefbdd86.js";import{_ as n}from"./default-i18n.65d58dd6.js";import{a7 as d,o as r,a3 as y,a4 as g,c as m,w as l,t as a,a as _,b as h,F as N,af as T,q as w}from"./runtime-core.esm-bundler.50cb9e6d.js";const i="all-in-one-seo-pack",R={setup(){return{rootStore:P()}},components:{BaseHighlightToggle:k,CoreAlert:A,GridColumn:C,GridRow:B},props:{type:{type:String,required:!0},options:{type:Object,required:!0},registeredPostStatuses:Object,excluded:{type:Array,default(){return[]}}},data(){return{strings:{label:n("Label:",i),name:n("Status:",i),noPostStatuses:n("No post statuses available.",i),noTaxonomies:n("No taxonomies available.",i),noPostStatusesDescription:n("All post statuses are set to noindex or your site does not have any post statuses registered that are supported by this feature.",i),noTaxonomiesDescription:n("All taxonomies are set to noindex or your site does not have any taxonomies registered that are supported by this feature.",i)}}},computed:{getRegisteredPostStatuses(){return this.registeredPostStatuses||this.rootStore.aioseo.postData},postStatuses(){return this.getRegisteredPostStatuses[this.type].filter(t=>!this.excluded.includes(t.status))}},methods:{emitInput(t){this.$emit("input",t)},updateValue(t,c){if(t){const u=this.options[this.type].included;u.push(c.status),this.options[this.type].included=u;return}const e=this.options[this.type].included.findIndex(u=>u===c.status);e!==-1&&this.options[this.type].included.splice(e,1)},getValue(t){return this.options[this.type].included.includes(t.status)},isActive(t){return this.options[this.type].included.findIndex(e=>e===t.status)!==-1}}},L={class:"aioseo-post-status-options-toggle"},q={class:"post-status-options-settings"};function G(t,c,e,u,p,s){const f=d("core-alert"),x=d("base-highlight-toggle"),S=d("grid-column"),b=d("grid-row");return r(),y("div",L,[g("div",q,[s.postStatuses.length===0&&e.type==="postStatuses"?(r(),m(f,{key:0,type:"blue"},{default:l(()=>[g("strong",null,a(p.strings.noPostStatuses),1),_(" "+a(p.strings.noPostStatusesDescription),1)]),_:1})):h("",!0),s.postStatuses.length===0&&e.type==="taxonomies"?(r(),m(f,{key:1,type:"blue"},{default:l(()=>[g("strong",null,a(p.strings.noTaxonomies),1),_(" "+a(p.strings.noTaxonomiesDescription),1)]),_:1})):h("",!0),0<s.postStatuses.length?(r(),m(b,{key:2},{default:l(()=>[(r(!0),y(N,null,T(s.postStatuses,(o,V)=>(r(),m(S,{md:"6",key:V},{default:l(()=>[w(x,{size:"medium",active:s.isActive(o),name:o.label,type:"checkbox",modelValue:s.getValue(o),"onUpdate:modelValue":v=>s.updateValue(v,o)},{default:l(()=>[_(a(o.label)+" ("+a(o.status)+") ",1)]),_:2},1032,["active","name","modelValue","onUpdate:modelValue"])]),_:2},1024))),128))]),_:1})):h("",!0)])])}const J=D(R,[["render",G]]);export{J as C};
