import { useState } from "react" import { FormattedMessage } from "react-intl" import { DefaultButton, Layer2Button } from "@/element/buttons" import { Icon } from "@/element/icon" import { type StreamProviderConfig, useStreamProvider } from "@/hooks/stream-provider" import Modal from "@/element/modal" import { useDiscoverProviders } from "@/hooks/discover-providers" import { ProviderCard } from "@/element/provider-card" interface ProviderSelectorProps { onClose: () => void } export function ProviderSelector({ onClose }: ProviderSelectorProps) { const { config: currentConfig, updateStreamProvider } = useStreamProvider() const providers = useDiscoverProviders() const isCurrentProvider = (providerConfig: StreamProviderConfig) => { return currentConfig.name === providerConfig.name && currentConfig.url === providerConfig.url } return (
) } export function ProviderSelectorButton() { const [show, setShow] = useState(false) return ( <>