define(['uiComponent','Magento_Customer/js/customer-data','../authorization'],function(Component,customerData,authorization){'use strict';return Component.extend({defaults:{logoutUrl:''},initialize:function(){this._super();this.config=customerData.get('company');this.config.subscribe(this._updateConfig.bind(this));},isCheckoutAllowed:function(){return!(this.config()['is_checkout_allowed']===false);},isCompanyBlocked:function(){return this.config()['is_company_blocked']===true;},hasNoCompany:function(){return this.config()['has_customer_company']===false;},isUsersViewAllowed:function(){return authorization.isAllowed('Magento_Company::users_view');},isStoreFrontRegistrationAllowed:function(){return!!this.config()['is_storefront_registration_allowed'];},_updateConfig:function(config){if(config['is_login_allowed']===false){location.href=this.logoutUrl;}}});});