import 'package:enaklo_pos/core/constants/colors.dart';
import 'package:enaklo_pos/core/extensions/build_context_ext.dart';
import 'package:enaklo_pos/presentation/home/models/order_model.dart';
import 'package:flutter/material.dart';

class SalesRightTitle extends StatelessWidget {
  final OrderModel? order;
  final List<Widget>? actionWidget;
  const SalesRightTitle({super.key, this.order, this.actionWidget});

  @override
  Widget build(BuildContext context) {
    return Container(
      height: context.deviceHeight * 0.1,
      padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 12.0),
      decoration: BoxDecoration(
        color: AppColors.white,
        border: Border(
          bottom: BorderSide(
            color: AppColors.background,
            width: 1.0,
          ),
        ),
      ),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          Expanded(
            child: Text(
              "Detail Pesanan #${order?.id}",
              style: TextStyle(
                color: AppColors.black,
                fontSize: 20,
                fontWeight: FontWeight.w600,
              ),
            ),
          ),
          if (actionWidget != null) ...actionWidget!,
        ],
      ),
    );
  }
}
