import{T as C,b as _,e as v,f as a,g as r,h as o,t as s,i as f,H as c,C as w,l,m as h,F as y}from"./app-BsP-5XS6.js";/*! 2FAuth version 5.2.0 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const g=o("div",{class:"too-bad"},null,-1),q={class:"block"},$={class:"block mb-6 light-or-darker"},E={key:0,class:"block has-text-link"},B={class:"button is-link is-outlined is-rounded"},F={class:"icon is-small"},N={__name:"QrContentDisplay",props:{qrContent:String},setup(e){const{copy:d}=C({legacy:!0}),u=_();function m(t){var n=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/,i=new RegExp(n);return i.test(t)}function b(t){const n=document.createElement("a");n.setAttribute("href",t),n.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0}))}function k(t){d(t),u.success({text:c("commons.copied_to_clipboard")})}return(t,n)=>{const i=v("FontAwesomeIcon");return a(),r(y,null,[g,o("div",q,s(t.$t("errors.data_of_qrcode_is_not_valid_URI")),1),o("div",$,s(e.qrContent?e.qrContent:"["+("trans"in t?t.trans:f(c))("commons.nothing")+"]"),1),e.qrContent?(a(),r("div",E,[o("button",{class:"button is-link is-outlined is-rounded",onClick:n[0]||(n[0]=w(p=>k(e.qrContent),["stop"]))},s(t.$t("commons.copy_to_clipboard")),1)])):l("",!0),m(e.qrContent)?(a(),r("div",{key:1,class:"block has-text-link",onClick:n[1]||(n[1]=p=>b(e.qrContent))},[o("button",B,[o("span",null,s(t.$t("commons.open_in_browser")),1),o("span",F,[h(i,{icon:["fas","external-link-alt"]})])])])):l("",!0)],64)}}};export{N as _};
