import{m as C}from"./index.684c656d.js";import"./translations.d159963e.js";import{b as I}from"./Caret.2e43336b.js";import{C as E}from"./Tooltip.f699c54b.js";import{u as L}from"./IndexStatus.834385fc.js";import{S as R}from"./External.5ab5cd1b.js";import{j as h,o as t,d as o,G as A,N as O,e as d,t as x,c as n,r as P,K as k,u as s,a as T,H as w,b as _,w as v}from"./runtime-dom.esm-bundler.d8b05b6d.js";import{_ as S,s as M}from"./default-i18n.20001971.js";import{S as N}from"./CheckSolid.6a15f8e6.js";import{S as q}from"./CloseSolid.a21e91be.js";import{S as B}from"./ExclamationSolid.2117778a.js";const V={class:"aioseo-index-status-result"},D={key:0},U={class:"aioseo-index-status-result__row-title"},j=["innerHTML"],F={key:0,class:"aioseo-index-status-result__row"},H=["href"],G={key:1},$={__name:"IndexStatusResult",props:{result:{type:Object,default(){return{}}},errorMessage:{type:String,default:""}},setup(e){const i="aioseo-pro",u=e,{items:r,strings:p}=L(),g=h(()=>u.errorMessage?u.errorMessage:S("Oops! It looks like something went wrong while loading the results for this page. Please try again by refreshing the page.",i));return(f,m)=>{var l,c,y;return t(),o("div",V,[(c=(l=e.result)==null?void 0:l.indexStatusResult)!=null&&c.verdict?(t(),o("div",D,[(t(!0),o(A,null,O(s(r),(a,b)=>(t(),o("div",{class:"aioseo-index-status-result__row",key:b},[d("div",U,x(a.title),1),d("div",{class:k(["aioseo-index-status-result__row-description",a.key])},[(t(),n(P(a.getIcon(e.result.indexStatusResult[a.key])))),d("span",{innerHTML:a.parseValue(e.result.indexStatusResult[a.key]).value},null,8,j)],2)]))),128)),(y=e.result)!=null&&y.inspectionResultLink?(t(),o("div",F,[d("a",{href:e.result.inspectionResultLink,target:"_blank",class:"aioseo-index-status-result__row-inspection-link"},[T(x(s(p).inspectOnGsc)+" ",1),w(s(R),{width:"12",height:"12"})],8,H)])):_("",!0)])):(t(),o("div",G,x(g.value),1))])}}},oe={__name:"IndexStatus",props:{loading:{type:Boolean,default:!1},result:{type:Object,default(){return{}}},tooltipOffset:{type:String,default(){return"0,0"}},viewable:{type:Boolean,default:!0}},setup(e){const i=C(),u="all-in-one-seo-pack",r=e,p=h(()=>{var f,m,l,c;if(!r.viewable||!((m=(f=r.result)==null?void 0:f.indexStatusResult)!=null&&m.verdict)&&i.quotaExceeded.urlInspection)return"exclamation";switch((c=(l=r.result)==null?void 0:l.indexStatusResult)==null?void 0:c.verdict){case"PASS":return"check";case"PARTIAL":case"FAIL":case"NEUTRAL":return"close";case"VERDICT_UNSPECIFIED":default:return"exclamation"}}),g=h(()=>r.viewable?i.quotaExceeded.urlInspection?S("Your site ran out of URL inspection quota. Please try again after 24 hours when the quota is renewed.",u):"":M(S("This page is not published so its index status cannot be determined. %1$s will determine the index status as soon as the page is published.",u),"AIOSEO"));return(f,m)=>(t(),o("div",{class:k(["aioseo-index-status",[e.viewable?"aioseo-index-status--viewable":"aioseo-index-status--not-viewable",s(i).quotaExceeded.urlInspection?"aioseo-index-status--quota-exceeded":""]])},[e.loading?(t(),n(s(I),{key:0,dark:""})):_("",!0),e.loading?_("",!0):(t(),n(s(E),{key:1,flip:"",offset:e.tooltipOffset},{tooltip:v(()=>[w(s($),{result:e.result,"error-message":g.value},null,8,["result","error-message"])]),default:v(()=>[d("div",null,[p.value==="check"?(t(),n(s(N),{key:0})):p.value==="close"?(t(),n(s(q),{key:1})):(t(),n(s(B),{key:2}))])]),_:1},8,["offset"]))],2))}};export{oe as _,$ as a};
