import{m as L,s as d}from"./index.36512665.js";import{G as q,a as N}from"./Row.d49feaf0.js";import"./translations.d159963e.js";import{x as h,o as t,l as n,m as i,a as s,t as c,b as l,c as g,N as w,K as M,G as k,J as y,y as V,H as b}from"./runtime-dom.esm-bundler.c4caba60.js";import{_ as B}from"./_plugin-vue_export-helper.eefbdd86.js";import{_ as S}from"./default-i18n.20001971.js";const _="all-in-one-seo-pack",G={emits:["update:separator"],setup(){return{settingsStore:L()}},components:{GridColumn:q,GridRow:N},props:{optionsSeparator:{type:String,required:!0},showMoreSlug:{type:String,required:!0}},data(){return{strings:{custom:S("Custom separator:",_),showMore:S("Show More",_),showLess:S("Show Less",_)},showMoreSeparators:!1,showMoreInitial:!0,customSeparator:null,separators:["&ndash;","&raquo;","&rsaquo;","&#x2023;","&rarr;","&bull;","&#47;","&#124;"],moreSeparators:["&#45;","&mdash;","&laquo;","&larr;","&gt;","&ge;","&#92;","&#43;","&#9658;"]}},watch:{showMoreSeparators(e){if(this.showMoreInitial){this.showMoreInitial=!1;return}this.settingsStore.toggleRadio({slug:this.showMoreSlug,value:e})},customSeparator(e){e!==null&&(this.$emit("update:separator",d(e)),this.separators.concat(this.moreSeparators).concat(this.decodedSeparators).concat(this.decodedMoreSeparators).includes(e)&&(this.customSeparator=null))}},computed:{hiddenSeparator(){return this.optionsSeparator===this.customSeparator||this.decodedMoreSeparators.includes(this.optionsSeparator)?this.optionsSeparator:null},decodedSeparators(){return this.separators.map(e=>d(e))},decodedMoreSeparators(){return this.moreSeparators.map(e=>d(e))},decodedCustomSeparator(){return d(this.hiddenSeparator)}},methods:{setSeparator(e){this.customSeparator=null,this.$emit("update:separator",e)}},mounted(){this.showMoreSeparators=this.settingsStore.settings.toggledRadio[this.showMoreSlug],this.customSeparator=this.decodedSeparators.concat(this.decodedMoreSeparators).includes(this.optionsSeparator)?null:this.optionsSeparator}},R={class:"active separator"},z=["onClick"],A=["onClick"],I={class:"show-more"},U={class:"custom-separator"},D={class:"show-more"};function E(e,u,f,F,r,a){const p=h("grid-column"),v=h("base-input"),x=h("grid-row");return t(),n(x,{class:"aioseo-separators"},{default:i(()=>[!r.showMoreSeparators&&a.hiddenSeparator?(t(),n(p,{key:0,xs:"2",sm:"1"},{default:i(()=>[s("div",R,c(a.decodedCustomSeparator),1)]),_:1})):l("",!0),(t(!0),g(k,null,w(a.decodedSeparators,(o,m)=>(t(),n(p,{xs:"2",sm:"1",key:m},{default:i(()=>[s("div",{onClick:C=>a.setSeparator(o),class:M(["separator",{active:f.optionsSeparator===o}])},c(o),11,z)]),_:2},1024))),128)),r.showMoreSeparators?(t(!0),g(k,{key:1},w(a.decodedMoreSeparators,(o,m)=>(t(),n(p,{xs:"2",sm:"1",key:`m_${m}`},{default:i(()=>[s("div",{onClick:C=>a.setSeparator(o),class:M(["separator",{active:f.optionsSeparator===o}])},c(o),11,A)]),_:2},1024))),128)):l("",!0),r.showMoreSeparators?l("",!0):(t(),n(p,{key:2,xs:a.hiddenSeparator?"3":"4"},{default:i(()=>[s("div",I,[s("a",{href:"#",onClick:u[0]||(u[0]=y(o=>r.showMoreSeparators=!0,["prevent"]))},c(r.strings.showMore)+"… ",1)])]),_:1},8,["xs"])),r.showMoreSeparators?(t(),n(p,{key:3,class:"custom-separator-col"},{default:i(()=>[s("div",U,[V(c(r.strings.custom)+" ",1),b(v,{spellcheck:!1,size:"medium",modelValue:r.customSeparator,"onUpdate:modelValue":u[1]||(u[1]=o=>r.customSeparator=o)},null,8,["modelValue"])])]),_:1})):l("",!0),r.showMoreSeparators?(t(),n(p,{key:4,xs:"2"},{default:i(()=>[s("div",D,[s("a",{href:"#",onClick:u[2]||(u[2]=y(o=>r.showMoreSeparators=!1,["prevent"]))},c(r.strings.showLess)+"… ",1)])]),_:1})):l("",!0)]),_:1})}const O=B(G,[["render",E]]);export{O as C};
