import{d as f,c as s,U as x,y as v,A as t,Q as c,J as h,K as a,u as p,B as m}from"./vendor-vue-CcL5gLKJ.js";import{u as k}from"./useClipboard-BmrQvb9s.js";import{u as g}from"./vendor-i18n-xZjp_O9P.js";import"./index-96Zm5C3V.js";import"./vendor-misc-BtWKXjYI.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"},B={class:"mt-6 space-y-4"},V={class:"input-label"},A={class:"flex gap-2"},N=["value"],U=["disabled"],$={class:"input-label"},O={class:"flex gap-2"},T=["value"],z=["disabled"],D={class:"input-label"},E={class:"flex gap-2"},I=["value"],J=["disabled"],K={key:0,class:"rounded-lg border border-red-200 bg-red-50 p-3 dark:border-red-700 dark:bg-red-900/30"},Q={class:"text-sm text-red-600 dark:text-red-400"},L=f({__name:"OAuthCallbackView",setup(R){const o=x(),{t:l}=g(),{copyToClipboard:y}=k(),n=s(()=>o.query.code||""),d=s(()=>o.query.state||""),b=s(()=>o.query.error||o.query.error_description||""),r=s(()=>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",B,[t("div",null,[t("label",V,a(p(l)("auth.oauth.code")),1),t("div",A,[t("input",{class:"input flex-1 font-mono text-sm",value:n.value,readonly:""},null,8,N),t("button",{class:"btn btn-secondary",type:"button",disabled:!n.value,onClick:e[0]||(e[0]=_=>i(n.value))}," Copy ",8,U)])]),t("div",null,[t("label",$,a(p(l)("auth.oauth.state")),1),t("div",O,[t("input",{class:"input flex-1 font-mono text-sm",value:d.value,readonly:""},null,8,T),t("button",{class:"btn btn-secondary",type:"button",disabled:!d.value,onClick:e[1]||(e[1]=_=>i(d.value))}," Copy ",8,z)])]),t("div",null,[t("label",D,a(p(l)("auth.oauth.fullUrl")),1),t("div",E,[t("input",{class:"input flex-1 font-mono text-xs",value:r.value,readonly:""},null,8,I),t("button",{class:"btn btn-secondary",type:"button",disabled:!r.value,onClick:e[2]||(e[2]=_=>i(r.value))}," Copy ",8,J)])]),b.value?(m(),v("div",K,[t("p",Q,a(b.value),1)])):h("",!0)])])])]))}});export{L as default};
