import wn from '../../../../../node_modules/preact/compat/dist/compat.module.mjs';
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__*/ wn.createElement(PageLoadingIndicator, null);
        case 'notLoggedIn':
            return /*#__PURE__*/ wn.createElement(Alert, null, notLoggedInValue);
        case 'error':
            return /*#__PURE__*/ wn.createElement(Alert, null, errorValue);
        case 'featureNotEnabled':
            return /*#__PURE__*/ wn.createElement(Alert, null, featureNotEnabledValue);
        case 'noPermission':
            return /*#__PURE__*/ wn.createElement(Alert, null, noPermissionValue);
        case 'success':
            return children;
    }
};

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