import 'package:hmg_patient_app/core/model/labs/LabOrderResult.dart';
import 'package:hmg_patient_app/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';

import 'Lab_Result_details_wideget.dart';

class LabResultChartAndDetails extends StatelessWidget {
  LabResultChartAndDetails({
    Key? key,
    required this.labResult,
    required this.name,
  }) : super(key: key);

  final List<LabOrderResult> labResult;
  final String name;

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.only(left: 17, top: 12, right: 13, bottom: 12),
      margin: EdgeInsets.only(left: 21, right: 21, top: 12),
      decoration: BoxDecoration(
        shape: BoxShape.rectangle,
        color: Colors.white,
        borderRadius: BorderRadius.all(
          Radius.circular(10.0),
        ),
        boxShadow: [
          BoxShadow(
            color: Color(0xff000000).withOpacity(.05),
            //spreadRadius: 5,
            blurRadius: 27,
            offset: Offset(0, -3),
          ),
        ],
      ),
      child: Column(
        mainAxisSize: MainAxisSize.min,
        children: [
          Row(
            mainAxisSize: MainAxisSize.min,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: <Widget>[
              Expanded(
                child: Text(
                  TranslationBase.of(context).graphDetails,
                  style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
                ),
              ),
            ],
          ),
          SizedBox(height: 8),
          LabResultDetailsWidget(
            labResult: labResult.reversed.toList(),
          )
        ],
      ),
    );
    // todo old was expandable, but new is not expandable
    // Column(
    //   mainAxisSize: MainAxisSize.min,
    //   children: <Widget>[
    //     Row(
    //       mainAxisSize: MainAxisSize.min,
    //       crossAxisAlignment: CrossAxisAlignment.center,
    //       children: <Widget>[
    //         Expanded(
    //           child: Text(
    //             TranslationBase.of(context).generalResult,
    //             style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
    //           ),
    //         ),
    //       ],
    //     ),
    //     LabResultDetailsWidget(
    //       labResult: labResult.reversed.toList(),
    //     ),
    //     AppExpandableNotifier(
    //       // headerWidget: Container(
    //       //   padding: EdgeInsets.only(left: 17, top: 12, right: 13, bottom: 12),
    //       //   margin: EdgeInsets.only(left: 21, right: 21, top: 21),
    //       //   decoration: BoxDecoration(
    //       //     shape: BoxShape.rectangle,
    //       //     color: Colors.white,
    //       //     borderRadius: BorderRadius.all(
    //       //       Radius.circular(10.0),
    //       //     ),
    //       //     boxShadow: [
    //       //       BoxShadow(
    //       //         color: Color(0xff000000).withOpacity(.05),
    //       //         //spreadRadius: 5,
    //       //         blurRadius: 27,
    //       //         offset: Offset(0, -3),
    //       //       ),
    //       //     ],
    //       //   ),
    //       //   child: LineChartCurved(
    //       //     title: name,
    //       //     labResult: labResult
    //       //   ),
    //       // ),
    //       title: TranslationBase.of(context).delete,
    //       bodyWidget: LabResultDetailsWidget(
    //         labResult: labResult.reversed.toList(),
    //       ),
    //       isExpand: true,
    //     ),
    //   ],
    // );
  }
}
