2026-08-25 07:51:38 +02:00
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
import { Button } from "@/components/ui/button";
|
|
|
|
|
import { Circle, Square } from "lucide-react";
|
|
|
|
|
|
|
|
|
|
interface RecordControlsProps {
|
|
|
|
|
active: boolean;
|
|
|
|
|
elapsedLabel: string;
|
|
|
|
|
disabled: boolean;
|
|
|
|
|
busy: boolean;
|
|
|
|
|
onStart: () => void;
|
|
|
|
|
onEnd: () => void;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function RecordControls({ active, elapsedLabel, disabled, busy, onStart, onEnd }: RecordControlsProps) {
|
|
|
|
|
if (active) {
|
|
|
|
|
return (
|
|
|
|
|
<div className="flex items-center gap-3">
|
|
|
|
|
<span className="flex items-center gap-2 text-sm font-medium">
|
|
|
|
|
<Circle className="bp-pulse size-2.5 fill-destructive text-destructive" />
|
|
|
|
|
Session live · {elapsedLabel}
|
|
|
|
|
</span>
|
2026-08-27 21:38:51 +02:00
|
|
|
<Button variant="outline" onClick={onEnd} disabled={busy}>
|
2026-08-25 07:51:38 +02:00
|
|
|
<Square className="size-3.5" /> End session
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
2026-08-26 18:47:30 +02:00
|
|
|
<Button onClick={onStart} disabled={disabled || busy}>
|
2026-08-25 07:51:38 +02:00
|
|
|
<Circle className="size-3.5" /> Start session
|
|
|
|
|
</Button>
|
|
|
|
|
);
|
|
|
|
|
}
|