import { jsx as _jsx } from "react/jsx-runtime";
import { useEffect } from 'react';
import { audioSrc } from '../audio/kds_audio';
import KDSCard from '../CardContent';
import '../../globalStyles.css';
export const KDSComponent = (props) => {
    const audio = new Audio(audioSrc);
    useEffect(() => {
        audio.play();
    }, []);
    const { order, venueConfig, callOrderApi, authProvider, kdsDeviceConfigs = {}, viewMode } = props;
    const { buckets, payments, lastChanged, id, orderType, due, extra, deliveryAddress = {}, comments = [], users = [], verifiedTime, } = order;
    return (buckets &&
        buckets.map((bucket, index) => bucket.lines.length > 0 && (_jsx(KDSCard, { bucket: bucket, bucketIndex: index, lastChanged: lastChanged, orderId: id, orderType: orderType, payments: payments, due: due, extra: extra, deliveryAddress: deliveryAddress, comments: comments, users: users, venueConfig: venueConfig, callOrderApi: callOrderApi, authProvider: authProvider, verifiedTime: verifiedTime, kdsDeviceConfigs: kdsDeviceConfigs, viewMode: viewMode }, id))));
};
//# sourceMappingURL=index.js.map