import 'dart:async';

import 'package:flutter/material.dart';

import '../../../../../widgets/components/superport_detail_dialog.dart';

export '../../../../../widgets/components/superport_detail_dialog.dart'
    show SuperportDetailDialogSection, SuperportDetailMetadata;

/// 재고 트랜잭션 상세 정보를 Superport 상세 다이얼로그로 감싼다.
Future<T?> showInventoryTransactionDetailDialog<T>({
  required BuildContext context,
  required String title,
  required List<SuperportDetailMetadata> metadata,
  List<SuperportDetailDialogSection> sections = const [],
  Widget? summary,
  List<Widget> summaryBadges = const [],
  String? description,
  List<Widget> actions = const [],
  bool barrierDismissible = true,
  BoxConstraints? constraints,
  EdgeInsetsGeometry? contentPadding,
  int metadataColumns = 2,
  String? initialSectionId,
  int initialSectionIndex = 0,
  FutureOr<void> Function()? onSubmit,
}) {
  return showSuperportDetailDialog<T>(
    context: context,
    title: title,
    description: description,
    summary: summary,
    summaryBadges: summaryBadges,
    metadata: metadata,
    sections: sections,
    actions: actions,
    barrierDismissible: barrierDismissible,
    constraints: constraints ?? const BoxConstraints(maxWidth: 920),
    contentPadding:
        contentPadding ??
        const EdgeInsets.symmetric(horizontal: 24, vertical: 24),
    metadataColumns: metadataColumns,
    initialSectionId: initialSectionId,
    initialSectionIndex: initialSectionIndex,
    onSubmit: onSubmit,
  );
}
