import 'package:flutter/material.dart';

import '../../../common/theme/theme.dart';
import 'empty_widget.dart';

class EmptySearchWidget extends StatelessWidget {
  final String? searchQuery;
  final VoidCallback? onClear;

  const EmptySearchWidget({super.key, this.searchQuery, this.onClear});

  @override
  Widget build(BuildContext context) {
    return EmptyWidget(
      title: 'Pencarian Tidak Ditemukan',
      message: searchQuery != null
          ? 'Tidak ada hasil untuk "$searchQuery"\nCoba kata kunci lain'
          : 'Coba gunakan kata kunci yang berbeda',
      emptyIcon: Icons.search_off_rounded,
      iconColor: AppColor.warning,
      buttonText: 'Hapus Filter',
      onRefresh: onClear,
      showButton: onClear != null,
    );
  }
}
