import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import{D as t,Dt as n,Et as r,Tt as i}from"./vendor-vue-core-X6q-rGJs.js";import{r as a,t as o}from"./types-DW97iHDr.js";import{r as s}from"./api-DQLKc1Xa.js";const c=n(`unloaded`),l=t(()=>c.value===`authenticated`),u=n({});function configValueOrDefault(e,t,n){return e[t]||n}let d=function(e){return e.SUPPORTS_PREVIEW_METADATA=`supports_preview_metadata`,e.MAX_UPLOAD_SIZE=`max_upload_size`,e.MANAGER_SUPPORTS_V4=`extension.manager.supports_v4`,e.MODEL_UPLOAD_BUTTON_ENABLED=`model_upload_button_enabled`,e.ASSET_RENAME_ENABLED=`asset_rename_enabled`,e.PRIVATE_MODELS_ENABLED=`private_models_enabled`,e.ONBOARDING_SURVEY_ENABLED=`onboarding_survey_enabled`,e.LINEAR_TOGGLE_ENABLED=`linear_toggle_enabled`,e.TEAM_WORKSPACES_ENABLED=`team_workspaces_enabled`,e.USER_SECRETS_ENABLED=`user_secrets_enabled`,e.NODE_REPLACEMENTS=`node_replacements`,e}({});function useFeatureFlags(){let e=i({get supportsPreviewMetadata(){return s.getServerFeature(d.SUPPORTS_PREVIEW_METADATA)},get maxUploadSize(){return s.getServerFeature(d.MAX_UPLOAD_SIZE)},get supportsManagerV4(){return s.getServerFeature(d.MANAGER_SUPPORTS_V4)},get modelUploadButtonEnabled(){return u.value.model_upload_button_enabled??s.getServerFeature(d.MODEL_UPLOAD_BUTTON_ENABLED,!1)},get assetRenameEnabled(){return u.value.asset_rename_enabled??s.getServerFeature(d.ASSET_RENAME_ENABLED,!1)},get privateModelsEnabled(){return u.value.private_models_enabled??s.getServerFeature(d.PRIVATE_MODELS_ENABLED,!1)},get onboardingSurveyEnabled(){return u.value.onboarding_survey_enabled??s.getServerFeature(d.ONBOARDING_SURVEY_ENABLED,!0)},get linearToggleEnabled(){return u.value.linear_toggle_enabled??s.getServerFeature(d.LINEAR_TOGGLE_ENABLED,!1)},get teamWorkspacesEnabled(){return!o||!l.value?!1:u.value.team_workspaces_enabled??s.getServerFeature(d.TEAM_WORKSPACES_ENABLED,!1)},get userSecretsEnabled(){return u.value.user_secrets_enabled??s.getServerFeature(d.USER_SECRETS_ENABLED,!1)},get nodeReplacementsEnabled(){return s.getServerFeature(d.NODE_REPLACEMENTS,!1)}}),featureFlag=(e,n)=>t(()=>s.getServerFeature(e,n));return{flags:r(e),featureFlag}}export{c as a,u as i,useFeatureFlags as n,configValueOrDefault as r,d as t};
//# sourceMappingURL=useFeatureFlags-CxRWjdi1.js.map