import 'package:flutter/material.dart';

import '../../../../../core/styles/my_dimensions.dart';
import '../../../../../domain/entities/product/product_data.dart';
import '../../../../widgets/ipm_html.dart';

class ProductHighlight extends StatelessWidget {
  final ProductData data;

  const ProductHighlight(this.data, {Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    if (data.excerpt == null || data.excerpt!.isEmpty) {
      return Container();
    }

    return Container(
      padding: EdgeInsets.only(
        top: MyDimens.dimen10,
        bottom: MyDimens.dimen16,
      ),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          IPMHtml(data.excerpt!, 'big'),
        ],
      ),
    );
  }
}
