import{r as e}from"./rolldown-runtime-DIIn1E2Q.js";import{D as t,Dt as n,Et as r,Tt as i}from"./vendor-vue-core-CvBSzfTV.js";import{t as a}from"./types-Bc3W4AWd.js";import{r as o}from"./api-OgmjiUkn.js";const s=n(`unloaded`),c=t(()=>s.value===`authenticated`),l=n({});function configValueOrDefault(e,t,n){return e[t]||n}let u=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}({});function useFeatureFlags(){let e=i({get supportsPreviewMetadata(){return o.getServerFeature(u.SUPPORTS_PREVIEW_METADATA)},get maxUploadSize(){return o.getServerFeature(u.MAX_UPLOAD_SIZE)},get supportsManagerV4(){return o.getServerFeature(u.MANAGER_SUPPORTS_V4)},get modelUploadButtonEnabled(){return l.value.model_upload_button_enabled??o.getServerFeature(u.MODEL_UPLOAD_BUTTON_ENABLED,!1)},get assetRenameEnabled(){return l.value.asset_rename_enabled??o.getServerFeature(u.ASSET_RENAME_ENABLED,!1)},get privateModelsEnabled(){return l.value.private_models_enabled??o.getServerFeature(u.PRIVATE_MODELS_ENABLED,!1)},get onboardingSurveyEnabled(){return l.value.onboarding_survey_enabled??o.getServerFeature(u.ONBOARDING_SURVEY_ENABLED,!1)},get linearToggleEnabled(){return!0},get teamWorkspacesEnabled(){return!a||!c.value?!1:l.value.team_workspaces_enabled??o.getServerFeature(u.TEAM_WORKSPACES_ENABLED,!1)},get userSecretsEnabled(){return l.value.user_secrets_enabled??o.getServerFeature(u.USER_SECRETS_ENABLED,!1)}}),featureFlag=(e,n)=>t(()=>o.getServerFeature(e,n));return{flags:r(e),featureFlag}}export{s as i,configValueOrDefault as n,l as r,useFeatureFlags as t};
//# sourceMappingURL=useFeatureFlags-CMK9o9Rw.js.map