import{j as i}from"./index-6605a014.js";import{r}from"./react-e45097e1.js";import{y as x,z as y,B as S,x as f,V as v}from"./Author-826c76c5.js";import{T as h}from"./Text-e955e48e.js";import P from"./Group-1e122902.js";import"./antd-6dbc138d.js";function o({children:s}){const t=x(),{text:p}=y(),{hover:e}=S(),[a,n,u,m]=f(["buttonFace","buttonFace@hover","text","text@hover"]),c=r.useMemo(()=>({cursor:"pointer",...a,...e&&n}),[a,n,e]),l=r.useMemo(()=>({cursor:"pointer",...u,...e&&m}),[u,m,e]);return i.jsx(v,{style:c,onMouseEnter:()=>{t.setState({hover:!0})},onMouseLeave:()=>{t.setState({hover:!1})},onClick:()=>{t.params.onPress&&t.params.onPress(),t.params.to||t.params.uri},children:r.Children.count(s)>0?s:i.jsx(h,{style:l,children:p})})}o.title="按钮";o.Group=P;o.isLayoutable=!0;o.params={to:{name:"参数对象",type:"json"},uri:{name:"链接"}};export{o as default};
