'use strict';

// src/features/talk-to-figma/domain/request.ts
function normalizeRequiredInput(value, label) {
  const normalized = value.trim();
  if (!normalized) {
    throw new Error(`${label} \uAC12\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694.`);
  }
  return normalized;
}
function normalizeTalkToFigmaPort(value) {
  const normalized = normalizeRequiredInput(value, "port");
  if (!/^\d+$/.test(normalized)) {
    throw new Error("port\uB294 \uC22B\uC790\uB9CC \uC785\uB825\uD574 \uC8FC\uC138\uC694.");
  }
  const port = Number(normalized);
  if (!Number.isInteger(port) || port < 1 || port > 65535) {
    throw new Error("port\uB294 1~65535 \uBC94\uC704\uB85C \uC785\uB825\uD574 \uC8FC\uC138\uC694.");
  }
  return port;
}
function normalizeTalkToFigmaChannelName(value) {
  return normalizeRequiredInput(value, "channelName");
}
function normalizeTalkToFigmaPrompt(value) {
  return normalizeRequiredInput(value, "\uD504\uB86C\uD504\uD2B8");
}
function createTalkToFigmaMcpServerInput() {
  return {
    args: ["cursor-talk-to-figma-mcp@latest"],
    command: "bunx",
    name: "TalkToFigma",
    transport: "stdio"
  };
}

exports.createTalkToFigmaMcpServerInput = createTalkToFigmaMcpServerInput;
exports.normalizeTalkToFigmaChannelName = normalizeTalkToFigmaChannelName;
exports.normalizeTalkToFigmaPort = normalizeTalkToFigmaPort;
exports.normalizeTalkToFigmaPrompt = normalizeTalkToFigmaPrompt;
