// The waiters on shift now (plan step 6.2): since when, what they took in, a break in progress;
// message one of them, look at their shift, or end it. "Start" puts a waiter without a shift
// on one (with the cash they start with) while the day is open.
import { useState } from 'react'
import toast from 'react-hot-toast'
import { BarChart3, Coffee, MessageSquare, Plus } from 'lucide-react'
import { errorMessage } from '@xenia/api'
import { parseNumber, useFormat, useTranslation } from '@xenia/i18n'
import { Button, Dialog, EmptyState, Field, IconButton, Input, Select, cx } from '@xenia/ui'
import { Avatar, Card, Money, Pill } from './parts'
import { useDuration } from './hooks'
export default function ShiftsCard({ shifts, idle, dayOpen, hidden, onStart, onEnd, onStats, onMessage, canMessage }) {
const { t } = useTranslation('manager')
const { formatTime } = useFormat()
const since = useDuration()
const [starting, setStarting] = useState(false)
return (
0 && } onClick={() => setStarting(true)} data-testid="shift-start">{t('overview.shifts.start')}}>