import{i as e}from"./chunk-B3pr0VN8.js";import{n as t,t as n}from"./jsx-runtime-wTfS3W87.js";import{t as r}from"./createLucideIcon-D8EZdzY3.js";import{t as i}from"./check-BDj1r-nL.js";import{t as a}from"./copy-Dd_CSnp-.js";var o=r(`Terminal`,[[`polyline`,{points:`4 17 10 11 4 5`,key:`akl6gq`}],[`line`,{x1:`12`,x2:`20`,y1:`19`,y2:`19`,key:`q2wloq`}]]),s=e(t(),1),c=n(),l=({method:e,className:t})=>(0,c.jsx)(`span`,{className:`doc-method doc-method-${e.toLowerCase()}${t?` ${t}`:``}`,children:e}),u=({code:e,language:t,title:n,className:r})=>{let[l,u]=(0,s.useState)(!1);return(0,c.jsxs)(`div`,{className:`doc-code${r?` ${r}`:``}`,children:[(0,c.jsxs)(`div`,{className:`doc-code-bar`,children:[(0,c.jsx)(`span`,{className:`doc-code-label`,children:n?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(o,{size:14,strokeWidth:1.8,"aria-hidden":`true`}),n]}):(0,c.jsx)(`span`,{className:`doc-code-lang`,children:t||`code`})}),(0,c.jsxs)(`button`,{type:`button`,className:`doc-code-copy`,onClick:async()=>{try{await navigator.clipboard.writeText(e),u(!0),window.setTimeout(()=>u(!1),1600)}catch{u(!1)}},"aria-label":`复制代码`,children:[l?(0,c.jsx)(i,{size:13,strokeWidth:2,"aria-hidden":`true`}):(0,c.jsx)(a,{size:13,strokeWidth:1.8,"aria-hidden":`true`}),l?`已复制`:`复制`]})]}),(0,c.jsx)(`pre`,{children:(0,c.jsx)(`code`,{children:e})})]})},d=({kind:e=`note`,title:t,children:n})=>(0,c.jsxs)(`div`,{className:`doc-callout doc-callout-${e}`,children:[t?(0,c.jsx)(`p`,{className:`doc-callout-title`,children:t}):null,(0,c.jsx)(`div`,{className:`doc-callout-body`,children:n})]}),f=({rows:e,empty:t})=>e.length===0&&t?(0,c.jsx)(d,{kind:`info`,children:t}):(0,c.jsx)(`div`,{className:`doc-table-wrap`,children:(0,c.jsxs)(`table`,{className:`doc-table`,children:[(0,c.jsx)(`thead`,{children:(0,c.jsxs)(`tr`,{children:[(0,c.jsx)(`th`,{children:`参数`}),(0,c.jsx)(`th`,{children:`类型`}),(0,c.jsx)(`th`,{children:`必填`}),(0,c.jsx)(`th`,{children:`说明`})]})}),(0,c.jsx)(`tbody`,{children:e.map(e=>(0,c.jsxs)(`tr`,{children:[(0,c.jsx)(`td`,{children:(0,c.jsx)(`code`,{children:e.name})}),(0,c.jsx)(`td`,{children:(0,c.jsx)(`span`,{className:`doc-type`,children:e.type})}),(0,c.jsx)(`td`,{children:e.required?(0,c.jsx)(`span`,{className:`doc-required`,children:`是`}):(0,c.jsx)(`span`,{className:`doc-optional`,children:`否`})}),(0,c.jsx)(`td`,{children:e.description})]},e.name))})]})}),p=({cols:e=2,children:t})=>(0,c.jsx)(`div`,{className:`doc-columns`,style:{gridTemplateColumns:`repeat(${e}, minmax(0, 1fr))`},children:t}),m=({title:e,description:t,to:n,href:r,cta:i})=>{let a=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(`strong`,{children:e}),t?(0,c.jsx)(`span`,{children:t}):null,i?(0,c.jsx)(`span`,{className:`doc-card-cta`,children:i}):null]});return n?(0,c.jsx)(`a`,{className:`doc-card`,href:n,children:a}):r?(0,c.jsx)(`a`,{className:`doc-card`,href:r,target:`_blank`,rel:`noopener noreferrer`,children:a}):(0,c.jsx)(`div`,{className:`doc-card doc-card-static`,children:a})},h=({method:e,path:t,description:n})=>(0,c.jsxs)(`div`,{className:`doc-endpoint-header`,children:[(0,c.jsxs)(`div`,{className:`doc-endpoint-line`,children:[(0,c.jsx)(l,{method:e}),(0,c.jsx)(`code`,{className:`doc-endpoint-path`,children:t})]}),n?(0,c.jsx)(`p`,{className:`doc-endpoint-desc`,children:n}):null]}),g=({id:e,children:t})=>(0,c.jsx)(`h2`,{id:e,className:`doc-section-title`,children:t}),_=({children:e})=>(0,c.jsx)(`div`,{className:`doc-prose`,children:e});export{h as a,g as c,p as i,m as n,f as o,u as r,_ as s,d as t};