import{_ as g}from"./js/_plugin-vue_export-helper.abeb2ae0.js";import{x as c,o as r,c as l,a as p,F as b,L as v,I as y,H as C,k as u,q as S,b as d,D as P,t as m,l as I,C as w,Y as x}from"./js/vue.runtime.esm-bundler.4a881941.js";import{l as T}from"./js/index.5d3e32c8.js";import{l as k}from"./js/index.43a192b7.js";import{l as E}from"./js/index.0b123ab1.js";import{u as A,e as L,l as N}from"./js/links.7c59a081.js";import{C as B}from"./js/Card.d20cb042.js";import{C as D}from"./js/SocialProfiles.bf5a3205.js";import{S as $}from"./js/LogoGear.49550bdb.js";import{e as F}from"./js/elemLoaded.9a6eb745.js";import"./js/translations.6e7b2383.js";import"./js/default-i18n.3881921e.js";import"./js/constants.238e5b7b.js";import"./js/Caret.02d7c74a.js";import"./js/isArrayLikeObject.ab8f4241.js";import"./js/Tooltip.bcf420d9.js";import"./js/Slide.7ee1d0f1.js";import"./js/Checkbox.257a03d8.js";import"./js/Checkmark.aaedf5f6.js";import"./js/Textarea.2ff0171c.js";import"./js/SettingsRow.f729cdc5.js";import"./js/Row.dbbe567c.js";import"./js/Twitter.6810a2f7.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"},H=["onClick"],O={class:"aioseo-settings-row aioseo-section-description"};function q(e,o,t,f,a,i){const _=c("CoreSocialProfiles"),h=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:C(J=>i.setActiveTab(n),["prevent"])},[s.svg?(r(),u(S(s.svg),{key:0})):d("",!0),P(" "+m(s.label),1)],10,H))),128))]),i.activeTabObject.slug==="social-profiles"?(r(),u(h,{key:0,slug:"userProfiles","header-text":a.strings.socialProfiles,"no-slide":"",toggles:!1},{default:I(()=>[p("div",O,m(a.strings.description),1),w(_,{userProfiles:f.settingsStore.userProfile.profiles,onUpdated:o[0]||(o[0]=s=>i.updateHiddenInputField(s))},null,8,["userProfiles"])]),_:1},8,["header-text"])):d("",!0)])}const G=g(R,[["render",q]]),j=()=>{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=x({...G,name:"Standalone/UserProfileTab"});e=T(e),e=k(e),e=E(e),N(e),e.mount("#aioseo-user-profile-tab")};F("#your-profile","profilePageLoaded");document.addEventListener("animationstart",function(e){e.animationName==="profilePageLoaded"&&(j(),z())});
