import 'package:flutter/material.dart';
import 'package:syncrow_web/pages/routines/widgets/routine_dialogs/effictive_period_dialog.dart';
import 'package:syncrow_web/pages/routines/widgets/period_option.dart';
import 'package:syncrow_web/pages/routines/widgets/repeat_days.dart';
import 'package:syncrow_web/utils/color_manager.dart';

class EffectivePeriodView extends StatelessWidget {
  const EffectivePeriodView({super.key});

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.all(16.0),
      child: ListView(
        children: [
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              const Spacer(),
              Expanded(
                child: Text(
                  'Effective Period',
                  style: Theme.of(context).textTheme.bodyMedium!.copyWith(
                      color: ColorsManager.textPrimaryColor,
                      fontWeight: FontWeight.w400,
                      fontSize: 14),
                ),
              ),
              const Spacer(),
            ],
          ),
          const Divider(
            color: ColorsManager.backgroundColor,
          ),
          const PeriodOptions(
            showCustomTimePicker: EffectPeriodHelper.showCustomTimePicker,
          ),
          const SizedBox(height: 16),
          const RepeatDays(),
          const SizedBox(height: 24),
        ],
      ),
    );
  }
}
