import 'package:flutter/material.dart';
import 'package:syncrow_app/features/devices/model/device_model.dart';
import 'package:syncrow_app/features/devices/view/widgets/lights/lights_list.dart';
import 'package:syncrow_app/features/devices/view/widgets/universal_switch.dart';
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
import 'package:syncrow_app/utils/resource_manager/constants.dart';

class LightsViewList extends StatelessWidget {
  const LightsViewList({
    super.key,
    required this.lights,
  });

  final List<DeviceModel> lights;

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: EdgeInsets.only(
        top: Constants.appBarHeight,
        right: Constants.defaultPadding,
        left: Constants.defaultPadding,
      ),
      child: SizedBox.expand(
        child: SingleChildScrollView(
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.stretch,
            children: [
              const BodySmall(text: "All Lights"),
              UniversalSwitch(
                allOn: false,
              ),
              LightsList(lights: lights),
            ],
          ),
        ),
      ),
    );
  }
}
