import{_ as v,r as c,o as i,c as l,f as u,F as b,i as y,n as P,g as C,h as m,k as $,a as d,e as w,t as f,w as I,d as x,b as T}from"./js/_plugin-vue_export-helper.2d9794a3.js";import{l as k}from"./js/index.c8cd2612.js";import{l as E}from"./js/index.fd0fcee8.js";import{l as A}from"./js/index.0b123ab1.js";import{a as S}from"./js/vuex.esm-bundler.8589b2dd.js";import{e as L,m as p,s as h}from"./js/index.02a5ed9a.js";import{C as N}from"./js/Card.24f1a534.js";import{C as B}from"./js/SocialProfiles.9268336a.js";import{S as D}from"./js/LogoGear.55b490aa.js";import{e as F}from"./js/elemLoaded.9a6eb745.js";import"./js/client.e7a26247.js";import"./js/_commonjsHelpers.f84db168.js";import"./js/default-i18n.ab92175e.js";import"./js/helpers.de7566d0.js";import"./js/constants.e9426d11.js";import"./js/isArrayLikeObject.c492f682.js";import"./js/Caret.42a820e0.js";import"./js/Tooltip.ae0bcccb.js";import"./js/Slide.cd756e61.js";import"./js/Checkbox.b4e8b6fc.js";import"./js/Checkmark.c5326878.js";import"./js/Textarea.33c8fce4.js";import"./js/SettingsRow.09a16661.js";import"./js/Row.5e452de4.js";import"./js/Twitter.fe969f86.js";const V={components:{CoreCard:N,CoreSocialProfiles:B,SvgLogoGear:D},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 s=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=s,window.location.href=this.$aioseo.urls.home+"/wp-admin/admin.php?page=followup-emails-reports&tab=reportuser_view&email="+encodeURIComponent(this.userProfile.userData.user_email)+"&user_id="+this.userProfile.userData.ID;break}},updateHiddenInputField(e){document.getElementById("aioseo-user-social-profiles").value=JSON.stringify(e)}},computed:{...S(["userProfile","options"]),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.userProfile.isWooCommerceFollowupEmailsActive&&e.push({label:this.$t.__("Customer Data",this.$td),slug:"customer-data"}),e},activeTabObject(){return this.tabs[this.activeTabIndex]}},created(){this.$store.state.loaded||L(this.$.appContext.app,{}),this.$store.state.userProfile=p({...this.$store.state.userProfile},{...this.$aioseo.userProfile}),this.$store.state.options=p({...this.$store.state.options},{...this.$aioseo.options}),this.$store.state.settings=p({...this.$store.state.settings},{...this.$aioseo.settings}),this.updateHiddenInputField(this.userProfile.profiles)},mounted(){const e=new URLSearchParams(window.location.search);e&&e.get("social-profiles")&&this.setActiveTab(1)}},O={id:"aioseo-user-profile-tab"},R={class:"navigation-bar"},U=["onClick"],H={class:"aioseo-settings-row aioseo-section-description"};function G(e,s,t,J,a,r){const _=c("CoreSocialProfiles"),g=c("CoreCard");return i(),l("div",O,[u("div",R,[(i(!0),l(b,null,y(r.tabs,(o,n)=>(i(),l("a",{key:n,class:P({active:n===a.activeTabIndex}),href:"#",onClick:C(M=>r.setActiveTab(n),["prevent"])},[o.svg?(i(),m($(o.svg),{key:0})):d("",!0),w(" "+f(o.label),1)],10,U))),128))]),r.activeTabObject.slug==="social-profiles"?(i(),m(g,{key:0,slug:"userProfiles","header-text":a.strings.socialProfiles,"no-slide":"",toggles:!1},{default:I(()=>[u("div",H,f(a.strings.description),1),x(_,{userProfiles:e.userProfile.profiles,onUpdated:s[0]||(s[0]=o=>r.updateHiddenInputField(o))},null,8,["userProfiles"])]),_:1},8,["header-text"])):d("",!0)])}const j=v(V,[["render",G]]),q=()=>{const e=document.getElementById("your-profile");if(!e)return;const s=document.createElement("div");s.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(s)},z=()=>{let e=T(j);e=k(e),e=E(e),e=A(e),e.use(h),h._vm=e,e.mount("#aioseo-user-profile-tab")};F("#your-profile","profilePageLoaded");document.addEventListener("animationstart",function(e){e.animationName==="profilePageLoaded"&&(q(),z())});
