import{jsxRuntimeExports as s}from"./vendor-react.js";import{TriangleAlert as n,Copy as c,toast as o}from"./vendor-common.js";import{buildExportReviewPrompt as x}from"../index.js";import{Dialog as p,DialogContent as h,DialogHeader as j,DialogTitle as g,DialogDescription as u,DialogFooter as f,Button as a}from"./dialog.js";import"./_commonjsHelpers.js";import"./spec-template-vendor.js";import"./vendor-antd.js";import"./preload-helper.js";import"./_commonjs-dynamic-modules.js";import"./AppDialogProvider.js";import"./excalidrawUiMode.js";import"./vendor-assistant.js";import"./vendor-export.js";import"./vendor-genie.js";function B({open:d,reviewResult:e,onOpenChange:t}){const i=(e==null?void 0:e.issues.filter(r=>r.blocking&&r.type==="error"))||[],m=async()=>{if(e)try{await navigator.clipboard.writeText(x(e)),o.success("已复制检查信息")}catch{o.error("复制失败，请检查剪贴板权限")}};return s.jsx(p,{open:d,onOpenChange:t,children:s.jsxs(h,{className:"max-h-[80vh] max-w-[720px] overflow-y-auto text-sm",children:[s.jsxs(j,{children:[s.jsxs(g,{className:"flex items-center gap-2",children:[s.jsx(n,{className:"h-4 w-4 text-amber-500"}),"导出前检查未通过"]}),s.jsx(u,{children:"复制下面的信息给 AI 处理后，再重新导出。"})]}),e?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"rounded-md border bg-muted/30 p-3",children:[s.jsx("div",{className:"text-xs text-muted-foreground",children:"当前文件"}),s.jsx("div",{className:"mt-1 font-mono text-sm",children:e.file})]}),s.jsxs("div",{className:"rounded-md border bg-muted/30 p-3",children:[s.jsx("div",{className:"text-xs text-muted-foreground",children:"规则"}),s.jsxs("div",{className:"mt-2 space-y-1 font-mono text-xs",children:[s.jsx("div",{children:"Axure 导出工作流"}),s.jsx("div",{children:"Axure API 规范"})]})]}),i.length>0?s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"text-sm font-medium",children:"阻断问题"}),i.map((r,l)=>s.jsxs("div",{className:"rounded-md border p-3",children:[s.jsxs("div",{className:"text-sm font-medium",children:["[",r.rule,"] ",r.message]}),r.suggestion?s.jsxs("div",{className:"mt-1 text-sm text-muted-foreground",children:["建议：",r.suggestion]}):null]},`blocking-${r.rule}-${l}`))]}):null]}):null,s.jsxs(f,{className:"gap-2",children:[s.jsx(a,{variant:"outline",size:"sm",onClick:()=>t(!1),children:"关闭"}),s.jsxs(a,{variant:"brand",size:"sm",onClick:()=>void m(),disabled:!e,children:[s.jsx(c,{className:"h-4 w-4"}),"复制给 AI"]})]})]})})}export{B as default};
