"use client"

import { AgendaVideoProviderIcon } from "@/components/agenda/agenda-video-provider-icon"
import { videoProviderLabel } from "@/lib/agenda/agenda-settings-labels"
import type { AgendaVideoProvider } from "@/lib/agenda/agenda-settings-types"
import { cn } from "@/lib/utils"

export function AgendaVideoProviderSelectLabel({
  provider,
  className,
  iconClassName,
}: {
  provider: AgendaVideoProvider
  className?: string
  iconClassName?: string
}) {
  return (
    <span className={cn("inline-flex min-w-0 items-center gap-2", className)}>
      <AgendaVideoProviderIcon
        provider={provider}
        className={cn("size-4 shrink-0", iconClassName)}
      />
      <span className="truncate">{videoProviderLabel(provider)}</span>
    </span>
  )
}
