import React__default from 'react';
import { Alert } from '../components/Alert.mjs';
import { PageLoadingIndicator } from '../components/PageLoadingIndicator.mjs';

const FeatureStateComponent = ({ featureState, children, notLoggedInValue, errorValue, featureNotEnabledValue, noPermissionValue })=>{
    switch(featureState){
        case 'loading':
            return /*#__PURE__*/ React__default.createElement(PageLoadingIndicator, null);
        case 'notLoggedIn':
            return /*#__PURE__*/ React__default.createElement(Alert, null, notLoggedInValue);
        case 'error':
            return /*#__PURE__*/ React__default.createElement(Alert, null, errorValue);
        case 'featureNotEnabled':
            return /*#__PURE__*/ React__default.createElement(Alert, null, featureNotEnabledValue);
        case 'noPermission':
            return /*#__PURE__*/ React__default.createElement(Alert, null, noPermissionValue);
        case 'success':
            return children;
    }
};

export { FeatureStateComponent };
//# sourceMappingURL=FeatureStateComponent.mjs.map
