import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
import {
  SETTINGS_ID,
  SETTINGS_KEY,
  SettingsAction
} from "./chunk-UMZQERLE.mjs";
import {
  Capabilities,
  LayoutAction,
  chain,
  contributes,
  createIntent,
  createResolver
} from "./chunk-ZEZ4FVEU.mjs";

// src/plugin-settings/intent-resolver.ts
import { pipe } from "effect";
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 ? pipe(openSettings, chain(LayoutAction.Open, {
          part: "main",
          subject: [
            `${SETTINGS_KEY}:${plugin.replaceAll("/", ":")}`
          ]
        })) : openSettings
      ]
    };
  }
}));
export {
  intent_resolver_default as default
};
//# sourceMappingURL=intent-resolver-W7Z7WFFM.mjs.map
