"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = exports.ToggleIconDecorator = exports.ToggleIconBase = exports.ToggleIcon = void 0;
var _kind = _interopRequireDefault(require("@enact/core/kind"));
var _deprecate = _interopRequireDefault(require("@enact/core/internal/deprecate"));
var _Pure = _interopRequireDefault(require("@enact/ui/internal/Pure"));
var _ToggleIcon = _interopRequireDefault(require("@enact/ui/ToggleIcon"));
var _compose = _interopRequireDefault(require("ramda/src/compose"));
var _Icon = _interopRequireDefault(require("../../Icon/Icon"));
var _Skinnable = _interopRequireDefault(require("../../Skinnable/Skinnable"));
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
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) { _defineProperty(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; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
 * Agate styled toggle icon.
 *
 * @example
 * <ToggleIcon selected>check</ToggleIcon>
 *
 * @module agate/ToggleIcon
 * @exports ToggleIcon
 * @exports ToggleIconBase
 * @exports ToggleIconDecorator
 * @deprecated Will be removed in 2.0.0.
 * @private
 */ /**
 * A component that indicates a boolean state.
 *
 * @class ToggleIconBase
 * @memberof agate/ToggleIcon
 * @extends ui/ToggleIcon.ToggleIcon
 * @ui
 * @private
 */
var ToggleIconBase = exports.ToggleIconBase = (0, _kind["default"])({
  name: 'ToggleIcon',
  render: (0, _deprecate["default"])(function (props) {
    return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ToggleIcon["default"], _objectSpread(_objectSpread({}, props), {}, {
      iconComponent: _Icon["default"]
    }));
  }, {
    name: 'agate/internal/ToggleIcon',
    until: '2.0.0'
  })
});

/**
 * Agate-specific behaviors to apply to `ToggleIconBase`.
 *
 * @hoc
 * @memberof agate/ToggleIcon
 * @mixes agate/Skinnable.Skinnable
 * @private
 */
var ToggleIconDecorator = exports.ToggleIconDecorator = (0, _compose["default"])(_Pure["default"], _Skinnable["default"]);

/**
 * A customizable Agate starting point {@link agate/Icon.Icon|Icon} that responds to the
 * `selected` prop.
 *
 * @class ToggleIcon
 * @memberof agate/ToggleIcon
 * @extends agate/ToggleIcon.ToggleIconBase
 * @mixes agate/ToggleIcon.ToggleIconDecorator
 * @ui
 * @private
 */
var ToggleIcon = exports.ToggleIcon = ToggleIconDecorator(ToggleIconBase);
var _default = exports["default"] = ToggleIcon;