// SPDX-FileCopyrightText: © 2025 Nøkken.io <nokken.io@proton.me>
// SPDX-License-Identifier: AGPL-3.0
//
// empty_state_view.dart
//
import 'package:flutter/material.dart';
import 'package:nokken/src/core/ui/theme/app_colors.dart';
import 'package:nokken/src/core/ui/theme/app_icons.dart';
import 'package:nokken/src/core/ui/theme/app_text_styles.dart';
import 'package:nokken/src/core/ui/widgets/shared_widgets.dart';

class EmptyStateView {
  static Widget noData() {
    return Center(
      child: SingleChildScrollView(
        child: Padding(
          padding: const EdgeInsets.all(24.0),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              Icon(
                AppIcons.getOutlined('analytics'),
                size: 80,
                color: AppColors.secondary.withAlpha(160),
              ),
              SharedWidgets.verticalSpace(24),
              Text(
                'Not enough data for analysis',
                style: AppTextStyles.headlineSmall,
                textAlign: TextAlign.center,
              ),
              SharedWidgets.verticalSpace(16),
              Text(
                'Continue tracking your health data regularly to unlock comprehensive analytics and personalized insights.',
                textAlign: TextAlign.center,
                style: AppTextStyles.bodyLarge,
              ),
              SharedWidgets.verticalSpace(40),
            ],
          ),
        ),
      ),
    );
  }

  static Widget emptyTab({
    required IconData icon,
    required String title,
    required String message,
  }) {
    return Center(
      child: SingleChildScrollView(
        child: Padding(
          padding: const EdgeInsets.all(24.0),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              Icon(
                icon,
                size: 80,
                color: AppColors.secondary.withAlpha(160),
              ),
              SharedWidgets.verticalSpace(24),
              Text(
                title,
                style: AppTextStyles.headlineSmall,
                textAlign: TextAlign.center,
              ),
              SharedWidgets.verticalSpace(16),
              Text(
                message,
                textAlign: TextAlign.center,
                style: AppTextStyles.bodyLarge,
              ),
            ],
          ),
        ),
      ),
    );
  }
}
