Liferay.Loader.define("commerce-frontend-js@3.0.43/components/data_renderers/DefaultRenderer", ['module', 'exports', 'require', '@frontend-taglib-clay$clayui/icon', 'frontend-js-react-web$prop-types', 'frontend-js-react-web$react', './TooltipTextRenderer'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = void 0;

    var _icon = _interopRequireDefault(require("@frontend-taglib-clay$clayui/icon"));

    var _propTypes = _interopRequireDefault(require("frontend-js-react-web$prop-types"));

    var _react = _interopRequireDefault(require("frontend-js-react-web$react"));

    var _TooltipTextRenderer = _interopRequireDefault(require("./TooltipTextRenderer"));

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

    /**
     * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
     * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
     */
    function DefaultRenderer(props) {
      switch (true) {
        case typeof props.value === 'number':
          return (/*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, props.value)
          );

        case !(props.value instanceof Object):
          return (/*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, props.value || '')
          );

        case !!props.value.icon:
          return (/*#__PURE__*/_react.default.createElement(_icon.default, {
              symbol: props.value.icon
            })
          );

        case !!props.value.iconSymbol && !!props.value.text:
          return (/*#__PURE__*/_react.default.createElement(_TooltipTextRenderer.default, {
              value: props.value
            })
          );

        case !!props.value.label:
          return (/*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, props.value.label)
          );

        default:
          throw new Error("The object ".concat(JSON.stringify(props.value), " doesn't match the template schema"));
      }
    }

    var _default = DefaultRenderer;
    exports.default = _default;
    //# sourceMappingURL=DefaultRenderer.js.map
  }
});
//# sourceMappingURL=DefaultRenderer.js.map