Liferay.Loader.define("commerce-frontend-js@4.0.75/components/account_selector/Trigger",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/icon","@frontend-taglib-clay$clayui/layout","@liferay/frontend-data-set-web","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$react","./Sticker"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=_interopRequireDefault(a("@frontend-taglib-clay$clayui/button")),l=_interopRequireDefault(a("@frontend-taglib-clay$clayui/icon")),n=a("@frontend-taglib-clay$clayui/layout"),c=a("@liferay/frontend-data-set-web"),u=_interopRequireDefault(a("liferay!frontend-js-react-web$classnames")),o=_interopRequireDefault(a("liferay!frontend-js-react-web$react")),d=_interopRequireDefault(a("./Sticker"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}function _objectWithoutProperties(e,t){if(null==e)return{};var a,r,l=function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var a,r,l={},n=Object.keys(e);for(r=0;r<n.length;r++)a=n[r],t.indexOf(a)>=0||(l[a]=e[a]);return l}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)a=n[r],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var f=o.default.forwardRef(((e,t)=>{let{active:a,currentAccount:f,currentOrder:i}=e,s=_objectWithoutProperties(e,["active","currentAccount","currentOrder"]);return o.default.createElement(r.default,_extends({},s,{className:(0,u.default)("btn-account-selector",f&&"account-selected"),displayType:"unstyled",ref:t}),f?o.default.createElement(o.default.Fragment,null,o.default.createElement(d.default,_extends({size:"xl"},f)),o.default.createElement("div",{className:"d-flex flex-column"},o.default.createElement("div",{className:"account-name"},o.default.createElement("span",{className:"text-truncate-inline"},o.default.createElement("span",{className:"text-truncate"},f.name))),o.default.createElement("div",{className:"d-flex"},(null==i?void 0:i.id)?o.default.createElement(o.default.Fragment,null,o.default.createElement("span",{className:"order-id"},i.id),o.default.createElement("span",{className:"col order-label"},o.default.createElement(c.StatusRenderer,{value:null==i?void 0:i.workflowStatusInfo}))):o.default.createElement(n.Row,null,o.default.createElement(n.Col,null,Liferay.Language.get("there-is-no-order-selected")))))):o.default.createElement("div",{className:"no-account-selected-placeholder"},o.default.createElement("span",{className:"text-truncate-inline"},o.default.createElement("span",{className:"text-truncate"},Liferay.Language.get("select-account-and-order")))),o.default.createElement(l.default,{symbol:a?"angle-up":"angle-down"}))}));t.default=f}}));
//# sourceMappingURL=Trigger.js.map