import { InfoIcon } from "lucide-react";
import { ChannelDropdownMenu } from "src/components/channels/ChannelDropdownMenu";
import { ChannelWarning } from "src/components/channels/ChannelWarning";
import { FormattedBitcoinAmount } from "src/components/FormattedBitcoinAmount";
import { Badge } from "src/components/ui/badge.tsx";
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "src/components/ui/card";
import { Progress } from "src/components/ui/progress.tsx";
import { Separator } from "src/components/ui/separator";
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from "src/components/ui/tooltip";
import { useNodeDetails } from "src/hooks/useNodeDetails";
import { formatAmount } from "src/lib/utils.ts";
import { Channel, LongUnconfirmedZeroConfChannel } from "src/types";
type ChannelsCardsProps = {
channels?: Channel[];
longUnconfirmedZeroConfChannels: LongUnconfirmedZeroConfChannel[];
};
export function ChannelsCards({
channels,
longUnconfirmedZeroConfChannels,
}: ChannelsCardsProps) {
if (!channels?.length) {
return null;
}
return (
Status
{channel.status == "online" ? ( unconfirmedChannel ? ({channel.public ? "Public" : "Private"}
{channel.localBalanceMsat <
channel.unspendablePunishmentReserveSat * 1000 && (
<>
{formatAmount(
Math.min(
channel.localBalanceMsat,
channel.unspendablePunishmentReserveSat * 1000
)
)}{" "}
/{" "}
>
)}
Spending
Receiving