import {
  SETTINGS_ID,
  SETTINGS_KEY,
  SettingsAction
} from "./chunk-SCPE4ZO2.mjs";
import {
  Capabilities,
  LayoutAction,
  chain,
  contributes,
  createIntent,
  createResolver
} from "./chunk-WPW5VVAX.mjs";

// src/plugin-settings/intent-resolver.ts
import * as Function from "effect/Function";
var intent_resolver_default = (() => contributes(Capabilities.IntentResolver, createResolver({
  intent: SettingsAction.Open,
  resolve: ({ plugin }) => {
    const openSettings = createIntent(LayoutAction.SwitchWorkspace, {
      part: "workspace",
      subject: SETTINGS_ID
    });
    return {
      intents: [
        plugin ? Function.pipe(openSettings, chain(LayoutAction.Open, {
          part: "main",
          subject: [
            `${SETTINGS_KEY}:${plugin.replaceAll("/", ":")}`
          ]
        })) : openSettings
      ]
    };
  }
})));
export {
  intent_resolver_default as default
};
//# sourceMappingURL=intent-resolver-QVCKRX6G.mjs.map
