Liferay.Loader.define("commerce-theme-minium-impl@4.0.24/action_menus/MiniumActionsMenu.soy", ['module', 'exports', 'require', 'frontend-js-metal-web$metal-component', 'frontend-js-metal-web$metal-soy'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = exports.templates = exports.MiniumActionsMenu = void 0;

    var _metalComponent = _interopRequireDefault(require("frontend-js-metal-web$metal-component"));

    var _metalSoy = _interopRequireDefault(require("frontend-js-metal-web$metal-soy"));

    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { default: obj };
    }

    function _typeof(obj) {
      "@babel/helpers - typeof";
      if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
        _typeof = function _typeof(obj) {
          return typeof obj;
        };
      } else {
        _typeof = function _typeof(obj) {
          return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
        };
      }return _typeof(obj);
    }

    function _classCallCheck(instance, Constructor) {
      if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
      }
    }

    function _possibleConstructorReturn(self, call) {
      if (call && (_typeof(call) === "object" || typeof call === "function")) {
        return call;
      }return _assertThisInitialized(self);
    }

    function _assertThisInitialized(self) {
      if (self === void 0) {
        throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
      }return self;
    }

    function _getPrototypeOf(o) {
      _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
        return o.__proto__ || Object.getPrototypeOf(o);
      };return _getPrototypeOf(o);
    }

    function _inherits(subClass, superClass) {
      if (typeof superClass !== "function" && superClass !== null) {
        throw new TypeError("Super expression must either be null or a function");
      }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });if (superClass) _setPrototypeOf(subClass, superClass);
    }

    function _setPrototypeOf(o, p) {
      _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
        o.__proto__ = p;return o;
      };return _setPrototypeOf(o, p);
    }

    var templates;
    exports.templates = templates;
    goog.loadModule(function (exports) {
      var soy = goog.require('soy');

      goog.require('soydata');

      // This file was automatically generated from MiniumActionsMenu.soy.
      // Please don't edit this file by hand.

      /**
       * @fileoverview Templates in namespace MiniumActionsMenu.
       * @public
       */

      goog.module('MiniumActionsMenu.incrementaldom');

      var incrementalDom = goog.require('incrementaldom');

      goog.require('soy.asserts');

      var soyIdom = goog.require('soy.idom');
      /**
       * @param {{
       *  _handleToggle: (*|null|undefined),
       *  actionItems: !Array<?>
       * }} opt_data
       * @param {Object<string, *>=} opt_ijData
       * @param {Object<string, *>=} opt_ijData_deprecated
       * @return {void}
       * @suppress {checkTypes}
       */

      function $render(opt_data, opt_ijData, opt_ijData_deprecated) {
        opt_ijData = opt_ijData_deprecated || opt_ijData;
        /** @type {*|null|undefined} */

        var _handleToggle = opt_data._handleToggle;
        /** @type {!Array<?>} */

        var actionItems = soy.asserts.assertType(goog.isArray(opt_data.actionItems), 'actionItems', opt_data.actionItems, '!Array<?>');
        incrementalDom.elementOpenStart('td');
        incrementalDom.attr('class', 'cell');
        incrementalDom.elementOpenEnd();

        if (actionItems != null && actionItems.length > 0) {
          incrementalDom.elementOpenStart('div');
          incrementalDom.attr('class', 'minium-actions-toggle-wrapper');
          incrementalDom.elementOpenEnd();
          incrementalDom.elementOpenStart('div');
          incrementalDom.attr('class', 'minium-action-toggle');
          incrementalDom.attr('data-onclick', _handleToggle);
          incrementalDom.elementOpenEnd();
          incrementalDom.elementOpenStart('svg');
          incrementalDom.attr('class', 'commerce-icon minium-action-toggle__open');
          incrementalDom.attr('viewBox', '0 0 4 16');
          incrementalDom.attr('xmlns', 'http://www.w3.org/2000/svg');
          incrementalDom.elementOpenEnd();
          incrementalDom.elementOpenStart('path');
          incrementalDom.attr('d', 'M0 2a2 2 0 1 1 4 0 2 2 0 0 1-4 0zm0 6a2 2 0 1 1 4 0 2 2 0 0 1-4 0zm0 6a2 2 0 1 1 4 0 2 2 0 0 1-4 0z');
          incrementalDom.attr('fill', 'currentColor');
          incrementalDom.attr('fill-rule', 'evenodd');
          incrementalDom.elementOpenEnd();
          incrementalDom.elementClose('path');
          incrementalDom.elementClose('svg');
          incrementalDom.elementOpenStart('svg');
          incrementalDom.attr('class', 'commerce-icon minium-action-toggle__close');
          incrementalDom.attr('viewBox', '0 0 13 8');
          incrementalDom.attr('xmlns', 'http://www.w3.org/2000/svg');
          incrementalDom.elementOpenEnd();
          incrementalDom.elementOpenStart('path');
          incrementalDom.attr('d', 'M8.002 3V.986A.986.986 0 0 1 9.685.289l3.027 3.015a.986.986 0 0 1 0 1.394L9.685 7.711a.984.984 0 0 1-1.683-.697V5H1a1 1 0 0 1 0-2h7.002z');
          incrementalDom.attr('fill', 'currentColor');
          incrementalDom.attr('fill-rule', 'evenodd');
          incrementalDom.elementOpenEnd();
          incrementalDom.elementClose('path');
          incrementalDom.elementClose('svg');
          incrementalDom.elementClose('div');
          incrementalDom.elementOpenStart('div');
          incrementalDom.attr('class', 'minium-table-actions');
          incrementalDom.attr('ref', 'actions');
          incrementalDom.elementOpenEnd();
          incrementalDom.elementOpenStart('div');
          incrementalDom.attr('class', 'minium-table-actions__buttons');
          incrementalDom.elementOpenEnd();
          var item29List = actionItems;
          var item29ListLen = item29List.length;

          for (var item29Index = 0; item29Index < item29ListLen; item29Index++) {
            var item29Data = item29List[item29Index];
            incrementalDom.elementOpenStart('a');
            incrementalDom.attr('class', 'commerce-button commerce-button--outline commerce-button--small ' + item29Data.cssClasses);

            if (item29Data.href != null) {
              incrementalDom.attr('href', item29Data.href);
            }

            if (item29Data.onClick != null) {
              incrementalDom.attr('onclick', item29Data.onClick);
            }

            incrementalDom.elementOpenEnd();
            soyIdom.print(item29Data.label);
            incrementalDom.elementClose('a');
          }

          incrementalDom.elementClose('div');
          incrementalDom.elementClose('div');
          incrementalDom.elementClose('div');
        }

        incrementalDom.elementClose('td');
      }

      exports.render = $render;
      /**
       * @typedef {{
       *  _handleToggle: (*|null|undefined),
       *  actionItems: !Array<?>
       * }}
       */

      $render.Params;

      if (goog.DEBUG) {
        $render.soyTemplateName = 'MiniumActionsMenu.render';
      }

      exports.render.params = ["_handleToggle", "actionItems"];
      exports.render.types = {
        "_handleToggle": "any",
        "actionItems": "list<?>"
      };
      exports.templates = templates = exports;
      return exports;
    });

    var MiniumActionsMenu = /*#__PURE__*/function (_Component) {
      _inherits(MiniumActionsMenu, _Component);

      function MiniumActionsMenu() {
        _classCallCheck(this, MiniumActionsMenu);

        return _possibleConstructorReturn(this, _getPrototypeOf(MiniumActionsMenu).apply(this, arguments));
      }

      return MiniumActionsMenu;
    }(_metalComponent.default);

    exports.MiniumActionsMenu = MiniumActionsMenu;

    _metalSoy.default.register(MiniumActionsMenu, templates);

    var _default = templates;
    /* jshint ignore:end */

    exports.default = _default;
    //# sourceMappingURL=MiniumActionsMenu.soy.js.map
  }
});
//# sourceMappingURL=MiniumActionsMenu.soy.js.map