import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/steper/steps_widget.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';

class SOAPStepHeader extends StatelessWidget {
  const SOAPStepHeader({
    Key? key,
    this.currentIndex,
    this.changePageViewIndex,
    this.patientInfo,
  }) : super(key: key);

  final int? currentIndex;
  final Function? changePageViewIndex;
  final PatiantInformtion? patientInfo;

  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.start,
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        SizedBox(
          height: SizeConfig.isHeightVeryShort
              ? 30
              : SizeConfig.isHeightShort
                  ? 35
                  : 15,
        ),
        AppText(
        (patientInfo?.episodeNo==0)?TranslationBase.of(context).createNew:TranslationBase.of(context).update,
          fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * (SizeConfig.isWidthLarge ? 3 : 4),
          fontWeight: FontWeight.w700,
          letterSpacing: -0.72,
          color: Color(0xFF2E303A),
        ),
        AppText(
          TranslationBase.of(context).episode,
          fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * (SizeConfig.isWidthLarge ? 6 : 8),
          fontWeight: FontWeight.bold,
          letterSpacing: -1.44,
          color: Color(0xFF2E303A),
        ),
        Container(
          color: Theme.of(context).scaffoldBackgroundColor,
          child: StepsWidget(
            index: currentIndex ?? 0,
            changeCurrentTab: changePageViewIndex,
            patientInfo: patientInfo,
          ),
        ),
        SizedBox(
          height: SizeConfig.heightMultiplier! * (SizeConfig.isHeightVeryShort ? 1 : 2),
        ),
      ],
    );
  }
}
