const a={data(){return{button1Loading:!1,button2Loading:!1}},methods:{getHref(t){if(!t)return"";let s=t;if(this.isRoute(t)){const o=t.split("#")[1].split(":");s=this.$aioseo.urls.aio.dashboard.replace("page=aioseo",`page=${o[0]}#/${o[1]}`)}return s},getTarget(t){return this.isRoute(t)?null:"_blank"},isRoute(t){return t.startsWith("http://route#")||t.startsWith("https://route#")},isAction(t){return t.startsWith("http://action#")||t.startsWith("https://action#")},getTagType(t){return this.isAction(t)?"button":"a"},processButtonClick(t,s){if(this[`button${s}Loading`]=!0,this.isAction(t))return this.processAction(t,s);if(this.isRoute(t))return this.processRoute(t,s);this[`button${s}Loading`]=!1},processAction(t,s){const r=/[^#?]*/gm,o=t.match(r),n=o[2];this.processButtonAction(n).then(()=>{if(o[4]&&o[4].startsWith("redirect=")){const e=o[4].replace("redirect=","").split(":"),i=this.$aioseo.urls.aio.dashboard.replace("page=aioseo",`page=${e[0]}#/${e[1]}`);if(i===window.location.href){window.location.reload();return}window.location.href=i}else o[4]&&o[4].startsWith("refresh")?window.location.reload():this[`button${s}Loading`]=!1})},processRoute(t){const s=/[^#?]*/gm,o=t.match(s)[2].split(":");this.$aioseo.urls.aio.dashboard.replace("page=aioseo",`page=${o[0]}#/${o[1]}`)===window.location.href&&window.location.reload()}}};export{a as U};
