// src/components/docs/integrations/IntegrationsMistralPage.tsx
import Link from "@contractspec/lib.ui-link";
import { ChevronRight } from "lucide-react";
import { jsx, jsxs } from "react/jsx-runtime";
function IntegrationsMistralPage() {
  return /* @__PURE__ */ jsxs("div", {
    className: "space-y-8",
    children: [
      /* @__PURE__ */ jsxs("div", {
        className: "space-y-4",
        children: [
          /* @__PURE__ */ jsx("h1", {
            className: "text-4xl font-bold",
            children: "Mistral"
          }),
          /* @__PURE__ */ jsx("p", {
            className: "text-muted-foreground",
            children: "Integrate Mistral models for chat, reasoning, embeddings, speech-to-text, and conversational voice workflows. ContractSpec ships first-class Mistral support across contracts, provider runtime wiring, and CLI provider selection."
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "space-y-4",
        children: [
          /* @__PURE__ */ jsx("h2", {
            className: "text-2xl font-bold",
            children: "Setup"
          }),
          /* @__PURE__ */ jsx("div", {
            className: "bg-background/50 border-border text-muted-foreground overflow-x-auto rounded-lg border p-4 font-mono text-sm",
            children: /* @__PURE__ */ jsx("pre", {
              children: `# .env
MISTRAL_API_KEY=...`
            })
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "space-y-4",
        children: [
          /* @__PURE__ */ jsx("h2", {
            className: "text-2xl font-bold",
            children: "Chat and reasoning"
          }),
          /* @__PURE__ */ jsx("div", {
            className: "bg-background/50 border-border text-muted-foreground overflow-x-auto rounded-lg border p-4 font-mono text-sm",
            children: /* @__PURE__ */ jsx("pre", {
              children: `capabilityId: mistral-chat
provider:
  type: mistral
  operation: chatCompletion

inputs:
  messages:
    type: array
  model:
    type: string
    default: "mistral-large-latest"
  temperature:
    type: number
    optional: true

outputs:
  content:
    type: string
  usage:
    type: object`
            })
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "space-y-4",
        children: [
          /* @__PURE__ */ jsx("h2", {
            className: "text-2xl font-bold",
            children: "Embeddings"
          }),
          /* @__PURE__ */ jsx("div", {
            className: "bg-background/50 border-border text-muted-foreground overflow-x-auto rounded-lg border p-4 font-mono text-sm",
            children: /* @__PURE__ */ jsx("pre", {
              children: `capabilityId: mistral-embeddings
provider:
  type: mistral
  operation: createEmbedding

inputs:
  text:
    type: string
  model:
    type: string
    default: "mistral-embed"

outputs:
  embedding:
    type: array
    items:
      type: number`
            })
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "space-y-4",
        children: [
          /* @__PURE__ */ jsx("h2", {
            className: "text-2xl font-bold",
            children: "Speech-to-Text (Voxtral)"
          }),
          /* @__PURE__ */ jsx("div", {
            className: "bg-background/50 border-border text-muted-foreground overflow-x-auto rounded-lg border p-4 font-mono text-sm",
            children: /* @__PURE__ */ jsx("pre", {
              children: `capabilityId: mistral-stt
provider:
  type: mistral
  operation: transcribe

inputs:
  audio:
    type: bytes
  format:
    type: string
  language:
    type: string
    optional: true

outputs:
  text:
    type: string
  segments:
    type: array
  language:
    type: string`
            })
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "space-y-4",
        children: [
          /* @__PURE__ */ jsx("h2", {
            className: "text-2xl font-bold",
            children: "Conversational voice sessions"
          }),
          /* @__PURE__ */ jsx("p", {
            className: "text-muted-foreground",
            children: "Use the conversational provider for session-based realtime voice flows (turn handling, events, and interruption-safe streaming)."
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "space-y-4",
        children: [
          /* @__PURE__ */ jsx("h2", {
            className: "text-2xl font-bold",
            children: "Best practices"
          }),
          /* @__PURE__ */ jsxs("ul", {
            className: "text-muted-foreground list-inside list-disc space-y-2",
            children: [
              /* @__PURE__ */ jsx("li", {
                children: "Choose model families by workload: coding, reasoning, or speech"
              }),
              /* @__PURE__ */ jsx("li", {
                children: "Persist session IDs for conversational continuity across turns"
              }),
              /* @__PURE__ */ jsx("li", {
                children: "Capture token and latency telemetry for provider-level tuning"
              }),
              /* @__PURE__ */ jsx("li", {
                children: "Set explicit fallbacks for network and rate-limit failures"
              })
            ]
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "flex items-center gap-4 pt-4",
        children: [
          /* @__PURE__ */ jsx(Link, {
            href: "/docs/integrations/openai",
            className: "btn-ghost",
            children: "Previous: OpenAI"
          }),
          /* @__PURE__ */ jsxs(Link, {
            href: "/docs/integrations/elevenlabs",
            className: "btn-primary",
            children: [
              "Next: ElevenLabs ",
              /* @__PURE__ */ jsx(ChevronRight, {
                size: 16
              })
            ]
          })
        ]
      })
    ]
  });
}
export {
  IntegrationsMistralPage
};
