import _defineProperty from "@babel/runtime/helpers/defineProperty";
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
import { useState } from 'react';
import { FcrButton } from '.';
import classNames from 'classnames';
import React from 'react';
import { jsx as _jsx } from "react/jsx-runtime";
export var FcrActionButton = function FcrActionButton(props) {
  var children = props.children,
    styleType = props.styleType,
    _props$active = props.active,
    active = _props$active === void 0 ? false : _props$active,
    _props$size = props.size,
    size = _props$size === void 0 ? 'large' : _props$size,
    iconType = props.iconType;
  var _useState = useState(false),
    _useState2 = _slicedToArray(_useState, 2),
    hover = _useState2[0],
    setHover = _useState2[1];
  return /*#__PURE__*/_jsx(FcrButton, {
    onClick: props.onClick,
    onHover: setHover,
    shape: "rounded",
    className: classNames("fcr-action-button fcr-action-button-".concat(size), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "fcr-action-button-".concat(styleType), !!styleType), 'fcr-action-button-active', active), 'fcr-action-button-show-icon', !!iconType), 'fcr-action-button-icon-only', !children)),
    size: "XXS",
    postIcon: iconType,
    postIconProps: {
      colors: {
        iconPrimary: active || styleType === 'primary' ? 'var(--fcr_ui_scene_white10)' : hover ? 'var(--fcr_web_ui_scene_mainicon2)' : 'var(--fcr_ui_scene_icontext1)'
      }
    },
    children: children
  });
};