import 'dart:async';

import 'package:flutter/material.dart';

import 'device_notification_settings_model.dart';
import '../../../product/base/bloc/base_bloc.dart';

class DeviceNotificationSettingsBloc extends BlocBase {
  final listNotifications =
      StreamController<List<DeviceNotificationSettings>>.broadcast();
  StreamSink<List<DeviceNotificationSettings>> get sinkListNotifications =>
      listNotifications.sink;
  Stream<List<DeviceNotificationSettings>> get streamListNotifications =>
      listNotifications.stream;

  final deviceThingID = StreamController<String>.broadcast();
  StreamSink<String> get sinkDeviceThingID => deviceThingID.sink;
  Stream<String> get streamDeviceThingID => deviceThingID.stream;

  final deviceNotificationSettingMap =
      StreamController<Map<String, int>>.broadcast();
  StreamSink<Map<String, int>> get sinkDeviceNotificationSettingMap =>
      deviceNotificationSettingMap.sink;
  Stream<Map<String, int>> get streamDeviceNotificationSettingMap =>
      deviceNotificationSettingMap.stream;

  final isDataChange = StreamController<bool>.broadcast();
  StreamSink<bool> get sinkIsDataChange => isDataChange.sink;
  Stream<bool> get streamIsDataChange => isDataChange.stream;

  final iconChange = StreamController<IconData>.broadcast();
  StreamSink<IconData> get sinkIconChange => iconChange.sink;
  Stream<IconData> get streamIconChange => iconChange.stream;

  final messageChange = StreamController<String>.broadcast();
  StreamSink<String> get sinkMessageChange => messageChange.sink;
  Stream<String> get streaMmessageChange => messageChange.stream;


  @override
  void dispose() {}
}
