import{r as f,j as v,g as t,o as c,Y as s,a1 as p,i as x,e as a,a2 as h,M as m}from"./vendor-vue-gvI8EVHg.js";import{u as k}from"./useClipboard-a-_H7f7P.js";import{u as g}from"./vendor-i18n-DnQQ95F5.js";import"./index-DCLQfd0E.js";import"./vendor-misc-DVqRnJX7.js";const C={class:"min-h-screen bg-gray-50 px-4 py-10 dark:bg-dark-900"},w={class:"mx-auto max-w-2xl"},q={class:"card p-6"},V={class:"mt-6 space-y-4"},B={class:"input-label"},N={class:"flex gap-2"},$=["value"],A=["disabled"],O={class:"input-label"},T={class:"flex gap-2"},U=["value"],j=["disabled"],z={class:"input-label"},D={class:"flex gap-2"},E=["value"],I=["disabled"],M={key:0,class:"rounded-lg border border-red-200 bg-red-50 p-3 dark:border-red-700 dark:bg-red-900/30"},R={class:"text-sm text-red-600 dark:text-red-400"},K=f({__name:"OAuthCallbackView",setup(S){const o=h(),{t:l}=g(),{copyToClipboard:y}=k(),n=a(()=>o.query.code||""),d=a(()=>o.query.state||""),b=a(()=>o.query.error||o.query.error_description||""),r=a(()=>typeof window>"u"?"":window.location.href),i=u=>{u&&y(u,"Copied")};return(u,e)=>(m(),v("div",C,[t("div",w,[t("div",q,[e[3]||(e[3]=t("h1",{class:"text-lg font-semibold text-gray-900 dark:text-white"},"OAuth Callback",-1)),e[4]||(e[4]=t("p",{class:"mt-2 text-sm text-gray-600 dark:text-gray-400"},[c(" Copy the "),t("code",null,"code"),c(" (and "),t("code",null,"state"),c(" if needed) back to the admin authorization flow. ")],-1)),t("div",V,[t("div",null,[t("label",B,s(p(l)("auth.oauth.code")),1),t("div",N,[t("input",{class:"input flex-1 font-mono text-sm",value:n.value,readonly:""},null,8,$),t("button",{class:"btn btn-secondary",type:"button",disabled:!n.value,onClick:e[0]||(e[0]=_=>i(n.value))}," Copy ",8,A)])]),t("div",null,[t("label",O,s(p(l)("auth.oauth.state")),1),t("div",T,[t("input",{class:"input flex-1 font-mono text-sm",value:d.value,readonly:""},null,8,U),t("button",{class:"btn btn-secondary",type:"button",disabled:!d.value,onClick:e[1]||(e[1]=_=>i(d.value))}," Copy ",8,j)])]),t("div",null,[t("label",z,s(p(l)("auth.oauth.fullUrl")),1),t("div",D,[t("input",{class:"input flex-1 font-mono text-xs",value:r.value,readonly:""},null,8,E),t("button",{class:"btn btn-secondary",type:"button",disabled:!r.value,onClick:e[2]||(e[2]=_=>i(r.value))}," Copy ",8,I)])]),b.value?(m(),v("div",M,[t("p",R,s(b.value),1)])):x("",!0)])])])]))}});export{K as default};
