import{b as P}from"./app-core.152db1db.js";import{B as k}from"./HighlightToggle.f86ae7ee.js";import{C as A}from"./Index.da555368.js";import{G as C,a as B}from"./Row.f5276b4c.js";import{_ as D}from"./_plugin-vue_export-helper.eefbdd86.js";import{_ as n}from"./vendor-other.35999c47.js";import{as as d,f as r,i as y,j as g,Q as m,R as l,U as a,ae as _,M as h,O as N,ad as R,a0 as T}from"./vendor-vue-ui.9852a9dd.js";const i="all-in-one-seo-pack",w={setup(){return{rootStore:P()}},components:{BaseHighlightToggle:k,CoreAlert:A,GridColumn:B,GridRow:C},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"},O={class:"post-status-options-settings"};function U(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",O,[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,R(s.postStatuses,(o,V)=>(r(),m(S,{md:"6",key:V},{default:l(()=>[T(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 H=D(w,[["render",U]]);export{H as C};
