import{_ as g}from"./js/_plugin-vue_export-helper.b97bdf23.js";import{r as c,o as r,c as l,a as p,F as b,h as v,n as y,i as S,b as u,D as C,f as d,g as P,t as m,w,d as I,G as T}from"./js/vue.runtime.esm-bundler.b39e1078.js";import{l as x}from"./js/index.cfe09a50.js";import{l as E}from"./js/index.0eabb636.js";import{l as k}from"./js/index.0b123ab1.js";import{u as A,d as L,l as N}from"./js/links.23796d97.js";import{C as B}from"./js/Card.79fe964d.js";import{C as D}from"./js/SocialProfiles.1d9ba50a.js";import{S as $}from"./js/LogoGear.c42c709f.js";import{e as F}from"./js/elemLoaded.9a6eb745.js";import"./js/translations.6e7b2383.js";import"./js/default-i18n.3881921e.js";import"./js/constants.1758f66e.js";import"./js/Caret.164d8058.js";import"./js/isArrayLikeObject.22a096cb.js";import"./js/Tooltip.6979830f.js";import"./js/Slide.cdf6c622.js";import"./js/Checkbox.17c05fc5.js";import"./js/Checkmark.e0bb6305.js";import"./js/Textarea.844f418e.js";import"./js/SettingsRow.1adac8e2.js";import"./js/Row.5242dafa.js";/* empty css                                               */import"./js/Twitter.32ea8329.js";const R={setup(){return{rootStore:A(),settingsStore:L()}},components:{CoreCard:B,CoreSocialProfiles:D,SvgLogoGear:$},data(){return{activeTabIndex:0,strings:{socialProfiles:this.$t.__("Social Profiles",this.$td),description:this.$t.__("To let search engines know which profiles are associated with this user, enter them below:",this.$td)}}},methods:{setActiveTab(e){const o=this.activeTabIndex;switch(this.activeTabIndex=e,this.activeTabObject.slug){case"personal-options":document.getElementById("your-profile").childNodes.forEach(t=>{t.style&&(t.style.display="block")});break;case"social-profiles":document.getElementById("your-profile").childNodes.forEach(t=>{t.id==="aioseo-user-profile-tab"||t.className==="submit"||!t.style||(t.style.display="none")});break;case"customer-data":this.activeTabIndex=o,window.location.href=this.rootStore.aioseo.urls.home+"/wp-admin/admin.php?page=followup-emails-reports&tab=reportuser_view&email="+encodeURIComponent(this.settingsStore.userProfile.userData.user_email)+"&user_id="+this.settingsStore.userProfile.userData.ID;break}},updateHiddenInputField(e){document.getElementById("aioseo-user-social-profiles").value=JSON.stringify(e)}},computed:{tabs(){const e=[{label:this.$t.__("Personal Options",this.$td),slug:"personal-options"},{label:this.$t.__("Social Profiles",this.$td),slug:"social-profiles",svg:"svg-logo-gear"}];return this.settingsStore.userProfile.isWooCommerceFollowupEmailsActive&&e.push({label:this.$t.__("Customer Data",this.$td),slug:"customer-data"}),e},activeTabObject(){return this.tabs[this.activeTabIndex]}},async created(){this.updateHiddenInputField(this.settingsStore.userProfile.profiles)},mounted(){const e=new URLSearchParams(window.location.search);e&&e.get("social-profiles")&&this.setActiveTab(1)}},U={id:"aioseo-user-profile-tab"},V={class:"navigation-bar"},G=["onClick"],H={class:"aioseo-settings-row aioseo-section-description"};function O(e,o,t,f,a,i){const h=c("CoreSocialProfiles"),_=c("CoreCard");return r(),l("div",U,[p("div",V,[(r(!0),l(b,null,v(i.tabs,(s,n)=>(r(),l("a",{key:n,class:y({active:n===a.activeTabIndex}),href:"#",onClick:S(J=>i.setActiveTab(n),["prevent"])},[s.svg?(r(),u(C(s.svg),{key:0})):d("",!0),P(" "+m(s.label),1)],10,G))),128))]),i.activeTabObject.slug==="social-profiles"?(r(),u(_,{key:0,slug:"userProfiles","header-text":a.strings.socialProfiles,"no-slide":"",toggles:!1},{default:w(()=>[p("div",H,m(a.strings.description),1),I(h,{userProfiles:f.settingsStore.userProfile.profiles,onUpdated:o[0]||(o[0]=s=>i.updateHiddenInputField(s))},null,8,["userProfiles"])]),_:1},8,["header-text"])):d("",!0)])}const j=g(R,[["render",O]]),q=()=>{const e=document.getElementById("your-profile");if(!e)return;const o=document.createElement("div");o.id="aioseo-user-profile-tab";const t=document.createElement("input");t.id="aioseo-user-social-profiles",t.name="aioseo-user-social-profiles",t.type="hidden",e.prepend(t),e.prepend(o)},z=()=>{let e=T({...j,name:"Standalone/UserProfileTab"});e=x(e),e=E(e),e=k(e),N(e),e.mount("#aioseo-user-profile-tab")};F("#your-profile","profilePageLoaded");document.addEventListener("animationstart",function(e){e.animationName==="profilePageLoaded"&&(q(),z())});
