import React, { forwardRef } from 'react' import { ExternalLink, KeyRound } from 'lucide-react' interface LtxApiKeyInputProps { value: string onChange: (e: React.ChangeEvent) => void placeholder?: string id?: string stopPropagation?: boolean className?: string } export const LtxApiKeyInput = forwardRef( ({ value, onChange, placeholder = 'Paste your API key', id, stopPropagation, className }, ref) => { return (
e.stopPropagation() : undefined} placeholder={placeholder} autoComplete="off" className="w-full rounded-lg border border-zinc-700 bg-zinc-900 py-2.5 pl-9 pr-3 text-sm text-zinc-100 placeholder:text-zinc-500 focus:outline-none focus:ring-2 focus:ring-blue-500" />
) }, ) LtxApiKeyInput.displayName = 'LtxApiKeyInput' interface ApiKeyHelperRowProps { stopPropagation?: boolean label?: string onOpenKey?: () => void } export function ApiKeyHelperRow({ stopPropagation, label = 'Get API key', onOpenKey }: ApiKeyHelperRowProps) { return (
Your key stays in your local app settings.
) } interface LtxApiKeyHelperRowProps { stopPropagation?: boolean } export function LtxApiKeyHelperRow({ stopPropagation }: LtxApiKeyHelperRowProps) { return ( window.electronAPI.openLtxApiKeyPage()} /> ) }