import 'package:fis_ui/index.dart';
import 'package:flutter/material.dart';
import 'package:flyinsono/architecture/define.dart';
import 'package:flyinsono/pages/remedical/consultation_record_view/controller.dart';
import 'package:fis_i18n/i18n.dart';
import 'package:fis_ui/base_define/page.dart';

class HistoryModeHeader extends FisView<ConsultationRecordViewController>
    implements FPage {
  HistoryModeHeader({Key? key}) : super(key: key);

  static MaterialStateProperty<EdgeInsetsGeometry> paddingEdgeInsets =
      MaterialStateProperty.all(
    EdgeInsets.symmetric(
      vertical: 15,
      horizontal: 50,
    ),
  );

  @override
  String get pageName => 'HistoryModeHeader';

  @override
  FWidget build(BuildContext context) {
    return FContainer(
      margin: EdgeInsets.symmetric(vertical: 10, horizontal: 15),
      child: FColumn(
        children: [
          FRow(
            children: [
              _builBackButton(),
              FSizedBox(
                width: 30,
                height: 56,
              ),
              FText(
                i18nBook.remedical.medicalHistory.t,
                style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18),
              ),
            ],
          )
        ],
      ),
    );
  }

  FWidget _builBackButton() {
    return FInkWell(
      onTap: () {
        controller.exitHistoryMode();
      },
      child: Row(
        children: [
          FIcon(
            Icons.arrow_back_ios,
            size: 20,
          ),
          FText(i18nBook.common.back.t),
        ],
      ),
    );
  }
}
