import 'package:pweb/pages/report/details/row.dart';


class DetailValue {
  final String label;
  final String? value;
  final bool multiline;
  final bool monospaced;

  const DetailValue({
    required this.label,
    required this.value,
    this.multiline = false,
    this.monospaced = false,
  });
}

List<DetailRow> buildDetailRows(List<DetailValue> values) {
  return values
      .where((item) {
        final value = item.value?.trim();
        return value != null && value.isNotEmpty && value != '-';
      })
      .map((item) => DetailRow(
            label: item.label,
            value: item.value!.trim(),
            multiline: item.multiline,
            monospaced: item.monospaced,
          ))
      .toList();
}
