import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import '../../providers/filter_providers.dart';
import 'package:lucide_icons/lucide_icons.dart';

class SakeNoMatchState extends ConsumerWidget {
  const SakeNoMatchState({super.key});

  @override
  Widget build(BuildContext context, WidgetRef ref) {
    return Center(
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Icon(LucideIcons.filterX, size: 48, color: Colors.grey[400]),
          const SizedBox(height: 16),
          Text('条件に一致するお酒が見つかりません', style: TextStyle(color: Colors.grey[600])),
          TextButton(
            child: const Text('フィルタを解除'),
            onPressed: () {
              ref.read(sakeSearchQueryProvider.notifier).set('');
              ref.read(sakeFilterFavoriteProvider.notifier).set(false);
              ref.read(sakeFilterTagProvider.notifier).set(null);
              ref.read(sakeFilterPrefectureProvider.notifier).set(null);
            },
          )
        ],
      ),
    );
  }
}
