import 'package:boilerplate/presentation/widgets/ipm_html.dart';
import 'package:flutter/material.dart';

import '../../../../../core/i18n/translations.g.dart';
import '../../../../../core/styles/my_dimensions.dart';
import '../../../../../domain/entities/product/product_data.dart';
import '../../../../widgets/ipm_title_text.dart';

class ProductIndustryGroup extends StatelessWidget {
  final ProductData data;

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

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

    return Container(
      padding: EdgeInsets.only(
        left: MyDimens.dimen16,
        right: MyDimens.dimen16,
        bottom: MyDimens.dimen16,
      ),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          IPMTitleText(
            title1: AppLocalizations.products.industrial_group_title_1,
            title2: AppLocalizations.products.industrial_group_title_2,
          ),
          IPMHtml(data.target!, ''),
        ],
      ),
    );
  }
}
