import 'package:flutter/material.dart';
import '../../providers/battle_provider.dart';

class ShopUI extends StatelessWidget {
  final BattleProvider battleProvider;

  const ShopUI({super.key, required this.battleProvider});

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          const Icon(Icons.store, size: 64, color: Colors.amber),
          const SizedBox(height: 16),
          const Text("Merchant Shop", style: TextStyle(fontSize: 24)),
          const SizedBox(height: 8),
          const Text("Buying/Selling feature coming soon!"),
          const SizedBox(height: 32),
          ElevatedButton(
            onPressed: () => battleProvider.proceedToNextStage(),
            child: const Text("Leave Shop"),
          ),
        ],
      ),
    );
  }
}

class RestUI extends StatelessWidget {
  final BattleProvider battleProvider;

  const RestUI({super.key, required this.battleProvider});

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          const Icon(Icons.local_hotel, size: 64, color: Colors.blue),
          const SizedBox(height: 16),
          const Text("Rest Area", style: TextStyle(fontSize: 24)),
          const SizedBox(height: 8),
          const Text("Take a breath and heal."),
          const SizedBox(height: 32),
          ElevatedButton(
            onPressed: () {
              battleProvider.player.heal(20);
              battleProvider.proceedToNextStage();
            },
            child: const Text("Rest & Leave (+20 HP)"),
          ),
        ],
      ),
    );
  }
}
