Liferay.Loader.define("commerce-frontend-js@4.0.75/components/mini_cart/OrderButton",["module","exports","require","@frontend-taglib-clay$clayui/button","liferay!frontend-js-react-web$react","../../utilities/index","./MiniCartContext","./util/constants","./util/index"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=_interopRequireDefault(r("@frontend-taglib-clay$clayui/button")),i=function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=n?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),a=r("../../utilities/index"),o=_interopRequireDefault(r("./MiniCartContext")),u=r("./util/constants"),l=r("./util/index");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var c=function OrderButton(){const{actionURLs:e,cartState:t,labels:r}=(0,i.useContext)(o.default),{checkoutURL:c,orderDetailURL:d}=e,{cartItems:f=[],workflowStatusInfo:s={}}=t,{code:p=u.WORKFLOW_STATUS_APPROVED}=s,_=!(0,l.hasErrors)(f)&&p===u.WORKFLOW_STATUS_APPROVED;return i.default.createElement("div",{className:"mini-cart-submit"},i.default.createElement(n.default,{block:!0,disabled:!f.length,onClick:()=>{(0,a.liferayNavigate)(_?c:d)}},_?r[u.SUBMIT_ORDER]:r[u.REVIEW_ORDER]))};t.default=c}}));
//# sourceMappingURL=OrderButton.js.map