import 'package:flutter/material.dart';
import 'package:syncrow_web/pages/device_managment/shared/device_controls_container.dart';
import 'package:syncrow_web/utils/color_manager.dart';

class PresenceDisplayValue extends StatelessWidget {
  const PresenceDisplayValue(
      {super.key, required this.value, required this.postfix, required this.description});

  final String value;
  final String postfix;
  final String description;

  @override
  Widget build(BuildContext context) {
    return DeviceControlsContainer(
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          Row(
            crossAxisAlignment: CrossAxisAlignment.end,
            children: [
              Text(
                value,
                style: Theme.of(context).textTheme.bodyLarge!.copyWith(
                    color: ColorsManager.dialogBlueTitle,
                    fontSize: 40,
                    fontWeight: FontWeight.w700),
              ),
              Padding(
                padding: const EdgeInsets.only(bottom: 10),
                child: Text(
                  postfix,
                  style: Theme.of(context).textTheme.bodySmall!.copyWith(
                      color: ColorsManager.blackColor, fontSize: 16, fontWeight: FontWeight.w700),
                ),
              ),
            ],
          ),
          Text(
            description,
            style: Theme.of(context).textTheme.bodySmall!.copyWith(
                color: ColorsManager.blackColor, fontWeight: FontWeight.w400, fontSize: 16),
          ),
        ],
      ),
    );
  }
}
