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