import express from 'express';
import {
    getFloors,
    createFloor,
    updateFloor,
    deleteFloor,
    getTables,
    createTable,
    updateTable,
    deleteTable
} from '../controllers/posController';

const router = express.Router();

// Floor Routes
router.get('/floors', getFloors);
router.post('/floors', createFloor);
router.put('/floors/:id', updateFloor);
router.delete('/floors/:id', deleteFloor);

// Table Routes
router.get('/tables', getTables);
router.post('/tables', createTable);
router.put('/tables/:id', updateTable);
router.delete('/tables/:id', deleteTable);

// Order Routes
import { createOrder, getOrders, updateOrderStatus, getKitchenOrders, settleTable } from '../controllers/posController';
router.post('/orders', createOrder);
router.get('/orders', getOrders);
router.put('/orders/:id/status', updateOrderStatus);
router.get('/orders/kitchen', getKitchenOrders);
router.post('/tables/:tableId/settle', settleTable);

export default router;
