part of "wall_sensor_interface.dart";

class PresenceIndicator extends StatelessWidget {
  const PresenceIndicator({super.key, required this.state});
  final String state;
  @override
  Widget build(BuildContext context) {
    // String state = wallSensor.status
    //     .firstWhere((element) => element.code == "presence_state")
    //     .value
    //     .toString();
    return Expanded(
      flex: 1,
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          SvgPicture.asset(
            state.toLowerCase() == 'motion'
                ? Assets.assetsIconsPresenceSensorAssetsPresenceSensorMotion
                : Assets.assetsIconsPresenceSensorAssetsPresence,
            width: 100,
            height: 100,
          ),
          const SizedBox(
            height: 10,
          ),
          BodyMedium(
            text: StringHelpers.toTitleCase(state),
            style: context.bodyMedium.copyWith(fontWeight: FontsManager.bold),
          ),
        ],
      ),
    );
  }
}
