part of 'structural_material_offline_bloc.dart';

class StructuralMaterialOfflineEvent extends Equatable {
  const StructuralMaterialOfflineEvent();

  @override
  List<Object> get props => [];
}

class AddStructuralMaterial extends StructuralMaterialOfflineEvent {
  final int id;
  final int bldgapprDetailsId;
  final List<String>? foundation;
  final List<String>? columns;
  final List<String>? beams;
  final List<String>? trussFraming;
  final List<String>? roof;
  final List<String>? flooring;
  final List<String>? walls;
  final List<String>? others;
  final String assessedById;
  final String assessedByName;
  final String dateCreated;
  final String dateModified;
  final String genCode;

  const AddStructuralMaterial(
      {required this.id,
      required this.bldgapprDetailsId,
      required this.foundation,
      required this.columns,
      required this.beams,
      required this.trussFraming,
      required this.roof,
      required this.flooring,
      required this.walls,
      required this.others,
      required this.assessedById,
      required this.assessedByName,
      required this.dateCreated,
      required this.dateModified,
      required this.genCode});

  @override
  List<Object> get props => [
        id,
        bldgapprDetailsId,
        ...?foundation,
        ...?columns,
        ...?beams,
        ...?trussFraming,
        ...?roof,
        ...?flooring,
        ...?walls,
        ...?others,
        assessedById,
        assessedByName,
        dateCreated,
        dateModified,
        genCode
      ];
}

class FetchSingleStructuralMaterial extends StructuralMaterialOfflineEvent {
  final int id;
  const FetchSingleStructuralMaterial({required this.id});

  @override
  List<Object> get props => [id];
}

class UpdateStructuralMaterials extends StructuralMaterialOfflineEvent {
  final StructureMaterialsII materials;
  final int id;

  UpdateStructuralMaterials({required this.id, required this.materials});

  @override
  List<Object> get props => [id, materials];
}
