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