"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"use client";
var _chunk5KRCPBZRcjs = require('./chunk-5KRCPBZR.cjs');var _chunk3CNSKST2cjs = require('./chunk-3CNSKST2.cjs');var _chunk5NXYDZPPcjs = require('./chunk-5NXYDZPP.cjs');var M=_chunk3CNSKST2cjs.a.call(void 0, "EulButton",["active","destructive","destructiveGhost","disabled","endIcon","focusVisible","fullWidth","ghost","iconOnly","iconSizeLarge","iconSizeMedium","iconSizeSmall","primary","root","secondary","sizeLarge","sizeMedium","sizeSmall","startIcon","stroke","noWrap"]);function w(o){let{children:l,endIcon:e,startIcon:i}=o,$=!l&&!!(!i&&e||i&&!e);return _chunk5KRCPBZRcjs.e.call(void 0, "EulButton",{endIcon:["endIcon",o.size&&`iconSize${_chunk3CNSKST2cjs.d.call(void 0, o.size)}`],root:["root",o.active&&"active",o.disabled&&"disabled",o.focusVisible&&"focusVisible",o.fullWidth&&"fullWidth",o.noWrap&&"noWrap",o.size&&`size${_chunk3CNSKST2cjs.d.call(void 0, o.size)}`,o.variant,$&&"iconOnly"],startIcon:["startIcon",o.size&&`iconSize${_chunk3CNSKST2cjs.d.call(void 0, o.size)}`]})}var t=M;var _react = require('react');var _reactslot = require('@radix-ui/react-slot');var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var _react3 = require('@emotion/react');var I=_chunk3CNSKST2cjs.m.call(void 0, "button")(({theme:o})=>_react3.css`
    position: relative;
    display: inline-flex;
    flex-direction: row;
    gap: ${o.spacing(2)};
    align-items: center;
    justify-content: center;
    height: ${o.spacing(11)};
    padding: ${o.spacing(0,3)};
    font-weight: ${o.typography.fontWeightMedium};
    text-decoration: none;
    background-color: transparent;
    border: none;
    border-radius: 100px;
    outline: 1px solid transparent;
    outline-offset: -1px;
    cursor: pointer;
    transition: ${o.transitions.create(["outline-width"],{duration:300})};

    &.${t.noWrap} {
      white-space: nowrap;
    }

    .${t.active}& {
      outline-width: 2px;
    }

    &.${t.fullWidth} {
      width: 100%;
    }

    &.${t.sizeSmall} {
      height: ${o.spacing(8)};
      font-size: ${o.typography.body2.fontSize};
      line-height: ${o.typography.body2.lineHeight};
    }

    &.${t.sizeMedium} {
      height: ${o.spacing(9)};
      font-size: ${o.typography.body1.fontSize};
      line-height: ${o.typography.body1.lineHeight};
    }

    &.${t.sizeLarge} {
      padding: ${o.spacing(0,4)};
      font-size: ${o.typography.body1.fontSize};
      line-height: ${o.typography.body1.lineHeight};
    }

    &.${t.destructive} {
      color: ${o.palette.red[700]};
      background-color: ${o.palette.redOpaque[300]};
      outline-color: ${o.palette.redOpaque[500]};

      &:hover {
        background-color: ${o.palette.redOpaque[400]};
      }
    }

    &.${t.destructiveGhost} {
      color: ${o.palette.red[700]};

      &.${t.active}, &:hover {
        background-color: ${o.palette.redOpaque[400]};
        outline-color: ${o.palette.redOpaque[500]};
      }
    }

    &.${t.ghost} {
      color: ${o.palette.teal[1e3]};
      outline-width: 0;
      outline-color: ${o.palette.background[600]};
      outline-offset: 0;

      .${t.active}& {
        outline-width: 2px;
      }

      &:hover,
      &.${t.active} {
        background-color: ${o.palette.background[600]};
      }
    }

    &.${t.primary} {
      color: ${o.palette.text.button};
      background-color: ${o.palette.teal[600]};
      outline-width: 0;
      outline-color: ${o.palette.teal[900]};
      outline-offset: 0;

      .${t.active}& {
        outline-width: 2px;
      }

      &:hover,
      &.${t.active} {
        background-color: ${o.palette.teal[900]};
      }
    }

    &.${t.secondary} {
      color: ${o.palette.teal[1e3]};
      background-color: ${o.palette.background[500]};
      outline-color: ${o.palette.background[600]};

      &:hover,
      &.${t.active} {
        background-color: ${o.palette.background[600]};

        outline-color: ${o.palette.background[700]};
      }
    }

    &.${t.stroke} {
      color: ${o.palette.teal[1e3]};
      outline-color: ${o.palette.tealOpaque[300]};

      &:hover,
      &.${t.active} {
        background-color: ${o.palette.tealOpaque[200]};
      }
    }

    &.${t.iconOnly} {
      min-width: ${o.spacing(11)};

      &.${t.sizeSmall} {
        min-width: ${o.spacing(8)};
      }

      &.${t.sizeMedium} {
        min-width: ${o.spacing(9)};
      }

      padding: 0;
    }

    &.${t.focusVisible} {
      outline: ${o.spacing(.5)} solid ${o.palette.yellow[600]};
      outline-offset: ${o.spacing(.5)};
    }

    &.${t.disabled},
      &.${t.disabled}:hover,
      &.${t.disabled}.${t.focusVisible} {
      color: ${o.palette.text.disabled};
      background-color: ${o.palette.background[300]};
      outline: none;
      cursor: not-allowed;
    }
  `);var _jsxruntime = require('react/jsx-runtime');var p=_react.forwardRef.call(void 0, (o,l)=>{let{asChild:e,endIcon:i,fullWidth:$,noWrap:h,size:D,startIcon:f,variant:F,...r}=o,C=e?_reactslot.Slot:"button",{children:n,className:W,...g}=r,{getRootProps:b,...O}=_chunk5KRCPBZRcjs.c.call(void 0, {...r,ref:l}),y=_chunk5KRCPBZRcjs.d.call(void 0, r),s=w({...o,...O,noWrap:h}),P=f&&_jsxruntime.jsx.call(void 0, _chunk5NXYDZPPcjs.s,{className:_clsx2.default.call(void 0, s.startIcon),display:"flex",children:f}),V=i&&_jsxruntime.jsx.call(void 0, _chunk5NXYDZPPcjs.s,{className:_clsx2.default.call(void 0, s.endIcon),display:"flex",children:i}),q=_react.useMemo.call(void 0, ()=>{let z={...b(),...y,...g},v=_react.Children.toArray(n)[0];return e&&_react.isValidElement.call(void 0, v)&&v.type==="a"?{...z,role:"link"}:z},[b,r,y,g,e,n]);if(e&&!n)throw new Error("Button asChild requires children");return _jsxruntime.jsxs.call(void 0, I,{...q,as:C,className:_clsx2.default.call(void 0, W,s.root),children:[P,_jsxruntime.jsx.call(void 0, _reactslot.Slottable,{children:n}),V]})});p.defaultProps={size:"large",variant:"primary"};p.displayName="Button";var T=p;exports.a = t; exports.b = T;
