import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_bar_chart.dart';
import 'package:diplomaticquarterapp/widgets/errors/app_embedded_error.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

class MonthPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    ProjectViewModel projectViewModel = Provider.of(context);
    return BaseView<H2OViewModel>(
      onModelReady: (model) => model.getUserProgressForMonthData(),
      builder: (_, model, widget) => AppScaffold(
        isShowAppBar: false,
        appBarTitle: TranslationBase.of(context).h2o,
        baseViewModel: model,
        body: Padding(
          padding: EdgeInsets.all(8.0),
          child: ListView(
            children: [
              Center(
                child: Text(
                  TranslationBase.of(context).waterConsumedInMonth,
                  textAlign: TextAlign.center,
                  style: TextStyle(fontSize: 20.0, color: Colors.black87),
                ),
              ),
              SizedBox(height: 16),
              Row(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  Container(
                    height: 10,
                    width: 40,
                    color: Colors.blue,
                  ),
                  SizedBox(width: 8),
                  Text(
                    TranslationBase.of(context).waterConsumedInMonth,
                    style: TextStyle(fontSize: 12.0),
                  ),
                ],
              ),
              //  SizedBox(height: 8),
              AppBarChart(seriesList: model.userProgressForMonthDataSeries, isArabic: projectViewModel.isArabic),
            ],
          ),
        ),
      ),
    );
  }
}
