import{i as e}from"./chunk-B3pr0VN8.js";import{n as t,t as n}from"./jsx-runtime-wTfS3W87.js";var r=e(t(),1),i=n(),a=({open:e,onClose:t,title:n=`扫码联系我们`,hint:a=`微信扫一扫 · 备注「学校 / 公司 + 称呼」`,eyebrow:o=`CONTACT · 扫码联系`})=>((0,r.useEffect)(()=>{if(!e)return;let n=e=>{e.key===`Escape`&&t()};return document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)},[e,t]),e?(0,i.jsx)(`div`,{className:`cqr-modal`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`contact-qr-title`,onClick:e=>{e.target===e.currentTarget&&t()},children:(0,i.jsxs)(`div`,{className:`cqr-dialog`,children:[(0,i.jsx)(`button`,{type:`button`,className:`cqr-close`,onClick:t,"aria-label":`关闭二维码`,children:`×`}),(0,i.jsx)(`p`,{className:`cqr-eyebrow`,children:o}),(0,i.jsx)(`h3`,{id:`contact-qr-title`,className:`cqr-title`,children:n}),(0,i.jsx)(`img`,{src:`/site/xin-ai-qr.png`,alt:`联系二维码`,className:`cqr-image`}),(0,i.jsx)(`p`,{className:`cqr-hint`,children:a})]})}):null);export{a as t};