"use strict";

require("core-js/modules/es.symbol.js");
require("core-js/modules/es.array.filter.js");
require("core-js/modules/es.array.for-each.js");
require("core-js/modules/es.array.push.js");
require("core-js/modules/es.object.define-properties.js");
require("core-js/modules/es.object.define-property.js");
require("core-js/modules/es.object.get-own-property-descriptor.js");
require("core-js/modules/es.object.get-own-property-descriptors.js");
require("core-js/modules/es.object.keys.js");
require("core-js/modules/esnext.iterator.constructor.js");
require("core-js/modules/esnext.iterator.filter.js");
require("core-js/modules/esnext.iterator.for-each.js");
require("core-js/modules/web.dom-collections.for-each.js");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = exports.Basic = void 0;
require("core-js/modules/es.array.map.js");
require("core-js/modules/es.object.to-string.js");
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var _ = require(".");
var _type = require("../icon/type");
var _action = require("./action");
var _react = _interopRequireDefault(require("react"));
var _i18n = require("../../i18n");
var _jsxRuntime = require("react/jsx-runtime");
var _excluded = ["type", "shape", "preIcon", "postIcon", "disabled", "styleType", "loading", "extra", "children"];
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var meta = {
  title: 'Components/Button',
  tags: ['autodocs'],
  argTypes: {
    text: {
      control: 'text',
      defaultValue: 'text'
    },
    type: {
      control: 'radio',
      options: ['primary', 'secondary', 'text', 'link'],
      defaultValue: 'primary'
    },
    shape: {
      control: 'radio',
      options: ['circle', 'rounded'],
      defaultValue: 'circle'
    },
    loading: {
      control: 'boolean',
      defaultValue: false
    },
    preIcon: {
      control: 'boolean',
      defaultValue: false
    },
    postIcon: {
      control: 'boolean',
      defaultValue: false
    },
    disabled: {
      control: 'boolean',
      defaultValue: false
    },
    styleType: {
      control: 'radio',
      options: ['danger', 'gray', 'white']
    },
    extra: {
      control: 'text',
      defaultValue: ''
    }
  }
};
var Basic = exports.Basic = {
  args: {
    children: 'Test Button'
  },
  render: function render(props) {
    var sizes = ['XL', 'L', 'M', 'S', 'XS', 'XXS'];
    var type = props.type,
      shape = props.shape,
      preIcon = props.preIcon,
      postIcon = props.postIcon,
      disabled = props.disabled,
      styleType = props.styleType,
      loading = props.loading,
      extra = props.extra,
      children = props.children,
      others = (0, _objectWithoutProperties2["default"])(props, _excluded);
    var t = (0, _i18n.useI18n)();
    return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
      style: {
        display: 'flex',
        flexDirection: 'column',
        padding: 20
      },
      children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
        children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
          children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("h3", {
            children: "type"
          }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
            style: {
              display: 'flex',
              gap: '10px'
            },
            children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.FcrButton, {
              styleType: "danger",
              type: "primary",
              children: "primary"
            }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.FcrButton, {
              type: "secondary",
              children: "secondary"
            }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.FcrButton, {
              type: "secondary-bordered",
              children: "secondary-bordered"
            }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.FcrButton, {
              type: "gray",
              children: "gray"
            }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.FcrButton, {
              type: "text",
              children: "text"
            }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.FcrButton, {
              type: "link",
              children: "link"
            })]
          })]
        }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
          children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("h3", {
            children: "shape"
          }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
            style: {
              display: 'flex',
              gap: '10px'
            },
            children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.FcrButton, {
              shape: "circle",
              children: "circle"
            }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.FcrButton, {
              shape: "rounded",
              children: "rounded"
            })]
          })]
        })]
      }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
        style: {
          marginLeft: 20
        },
        children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("h3", {
          children: "Size"
        }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
          style: {
            display: 'flex',
            flexDirection: 'column',
            gap: '10px'
          },
          children: sizes.map(function (size) {
            return /*#__PURE__*/(0, _jsxRuntime.jsx)(_.FcrButton, _objectSpread(_objectSpread({
              onClick: function onClick() {
                console.log('click');
              },
              extra: extra,
              size: size,
              loading: loading,
              disabled: disabled,
              type: type,
              shape: shape,
              preIcon: preIcon && _type.FcrIconType.FCR_HOST,
              postIcon: postIcon && _type.FcrIconType.FCR_HOST,
              styleType: styleType
            }, others), {}, {
              children: children
            }), size);
          })
        })]
      }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
        children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("h3", {
          children: "action"
        }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
          style: {
            display: 'flex',
            alignItems: 'center',
            gap: 5
          },
          children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_action.FcrActionButton, {
            iconType: _type.FcrIconType.FCR_DROPDOWN,
            children: t('fmt_participants_member_button_more')
          }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_action.FcrActionButton, {
            iconType: _type.FcrIconType.FCR_DROPDOWN,
            active: true,
            children: t('fmt_participants_member_button_more')
          }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_action.FcrActionButton, {
            size: "small",
            children: t('fmt_device_label_audio_unmute')
          }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_action.FcrActionButton, {
            size: "small",
            iconType: _type.FcrIconType.FCR_MOBILE_MORE
          }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_action.FcrActionButton, {
            active: true,
            children: t('fmt_device_label_audio_unmute')
          }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_action.FcrActionButton, {
            styleType: "primary",
            children: t('fmt_device_label_audio_mute')
          }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_action.FcrActionButton, {
            iconType: _type.FcrIconType.FCR_MOBILE_MORE
          })]
        })]
      })]
    });
  }
};
var _default = exports["default"] = meta;