import {
  SETTINGS_ID,
  SETTINGS_KEY,
  SettingsAction
} from "./chunk-ORWHM7CO.mjs";
import {
  Capabilities,
  LayoutAction,
  chain,
  contributes,
  createIntent,
  createResolver
} from "./chunk-FMN65HSW.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-ZTNOSO3A.mjs.map
