import "./chunk-4DQMLMGU.mjs";
import {
  capabilities_exports
} from "./chunk-IGRQWMWW.mjs";
import {
  activation_events_exports
} from "./chunk-NPUEVX42.mjs";
import "./chunk-YAFEA4GV.mjs";
import "./chunk-WGWEEBUV.mjs";
import "./chunk-PKQT6C53.mjs";
import {
  plugin_exports
} from "./chunk-KWP6PKIU.mjs";
import {
  capability_exports
} from "./chunk-ZQO3UZ4R.mjs";
import "./chunk-J5LGTIGS.mjs";

// src/plugin-runtime/capability.ts
import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
import * as ManagedRuntime from "effect/ManagedRuntime";
var capability_default = capability_exports.makeModule(Effect.fnUntraced(function* () {
  const capabilityManager = yield* capability_exports.Service;
  const pluginManager = yield* plugin_exports.Service;
  yield* plugin_exports.activate(activation_events_exports.SetupLayer);
  const layers = yield* capability_exports.getAll(capabilities_exports.Layer);
  const capabilityServiceLayer = Layer.succeed(capability_exports.Service, capabilityManager);
  const pluginServiceLayer = Layer.succeed(plugin_exports.Service, pluginManager);
  const composedLayer = layers.length > 0 ? Layer.mergeAll(capabilityServiceLayer, pluginServiceLayer, ...layers) : Layer.mergeAll(capabilityServiceLayer, pluginServiceLayer);
  const runtime = ManagedRuntime.make(composedLayer);
  return capability_exports.contributes(capabilities_exports.ManagedRuntime, runtime);
}));
export {
  capability_default as default
};
//# sourceMappingURL=capability-7LE5X2NH.mjs.map
