import 'dart:ui';

import 'package:dartz/dartz.dart';
import 'package:freezed_annotation/freezed_annotation.dart';

import '../../common/api/api_failure.dart';

part 'table.freezed.dart';

part 'entities/table_entity.dart';
part 'failures/table_failure.dart';
part 'repositories/i_table_repository.dart';

enum TableStatusType { available, occupied, unknown }

extension TableStatusTypeX on TableStatusType {
  String toStringType() => switch (this) {
    TableStatusType.available => 'available',
    TableStatusType.occupied => 'occupied',
    TableStatusType.unknown => 'unknown',
  };

  bool get isAvailable => this == TableStatusType.available;
  bool get isOccupied => this == TableStatusType.occupied;
}
