import 'package:boilerplate/data/models/product/DipRegisInfoModel.dart';
import 'package:boilerplate/domain/entities/product/product_data.dart';
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 '../../../../widgets/ipm_title_text.dart';

class ProductRegistrationInfo extends StatelessWidget {
  final ProductData data;
  final DipRegisInfoModel dipRegisInfoModel;
  final String lang;
  const ProductRegistrationInfo(this.data, this.dipRegisInfoModel, this.lang,
      {Key? key})
      : super(key: key);
  final String request_number = "";
  final String request_name = "";
  final String request_date = "";
  final String expire_date = "";
  final String name = "";
  final String address_of_request_name = "";
  final String certificate_date = "";
  final String certificate_number = "";
  getData() {
    if (dipRegisInfoModel.result!.type == "A0019") {
      request_number == 'เลขที่คำขอ';
      request_name == 'ชื่อผู้ขอ (ผู้ขาย)';
      request_date == 'วันที่ยื่นคำขอ';
      expire_date == 'วันสิ้นอายุ';
      name == 'ชื่อการประดิษฐ์';
      address_of_request_name == 'ที่อยู่ผู้ขอ (ผู้ขาย)';
      certificate_number == 'เลขที่สิทธิบัตร';
      certificate_date == 'วันที่ออกสิทธิบัตร';
    } else if (dipRegisInfoModel.result!.type == "A0006") {
      request_number == 'เลขที่คำขอ';
      request_name == 'ชื่อผู้ขอ (ผู้ขาย)';
      request_date == 'วันที่ยื่นคำขอ';
      expire_date == 'วันสิ้นอายุ';
      name == 'ชื่อการประดิษฐ์';
      address_of_request_name == 'ที่อยู่ผู้ขอ (ผู้ขาย)';
      certificate_number == 'เลขที่อนุสิทธิบัตร';
      certificate_date == 'วันที่ออกอนุสิทธิบัตร';
    } else if (dipRegisInfoModel.result!.type == "A0005") {
      request_number == 'เลขที่คำขอ';
      request_name == 'ชื่อผู้ขอ (ผู้ขาย)';
      request_date == 'วันที่ยื่นคำขอ';
      expire_date == 'วันสิ้นอายุ';
      name == 'ชื่อการประดิษฐ์/การออกแบบผลิตภัณฑ์';
      address_of_request_name == 'ที่อยู่ผู้ขอ (ผู้ขาย)';
      certificate_number == 'เลขที่สิทธิบัตร';
      certificate_date == 'วันที่ออกสิทธิบัตร';
    } else if (dipRegisInfoModel.result!.type == "A0007") {
      request_number == 'เลขที่คำขอ';
      request_name == 'เจ้าของเครื่องหมาย';
      request_date == 'วันที่ยื่นคำขอ';
      expire_date == 'วันสิ้นอายุ';
      name == 'เจ้าของเครื่องหมาย';
      address_of_request_name == 'ที่อยู่เจ้าของเครื่องหมาย (ผู้ขาย)';
      certificate_number == 'ทะเบียนเลขที่';
      certificate_date == 'xx';
    } else if (dipRegisInfoModel.result!.type == "A0001") {
      request_number == 'เลขทะเบียน';
      request_name == 'ชื่อเจ้าของ';
      request_date == 'วันที่ยื่นคำขอ';
      expire_date == 'วันสิ้นอายุ';
      name == 'ชื่อผลงาน';
      address_of_request_name == 'ที่อยู่เจ้าของเครื่องหมาย (ผู้ขาย)';
      certificate_number == 'ทะเบียนเลขที่';
      certificate_date == '';
    }
  }

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

    getData();
    print("dipRegisInfoModel.result!.type ${dipRegisInfoModel.result!.type}");

    // 'A0001' => [
    // 'register_number' => 'เลขทะเบียน',
    // 'request_name' => 'ชื่อเจ้าของ',
    // 'request_number' => 'เลขที่คำขอ',
    // 'request_date' => 'วันที่ยื่นคำขอ',
    // 'type' => 'ประเภทงาน',
    // 'name' => 'ชื่อผลงาน',
    // 'address_of_request_name' => 'ที่อยู่ผู้ติดต่อ',
    // ],
    // 'A0003' => [
    // 'products' => 'ชื่อสิ่งบ่งชี้ทางภูมิศาสตร์/รายการสินค้า GI',
    // 'request_number' => 'เลขที่คำขอ อสช. (สำหรับรับรองผู้ประกอบการ)',
    // 'category' => 'หมวดสินค้า',
    // 'type' => 'ประเภทสินค้า',
    // 'province' => 'จังหวัด',
    // 'region' => 'ภูมิภาค',
    // ],

    return Container(
      width: MediaQuery.of(context).size.width - 24,
      padding: EdgeInsets.only(
        left: MyDimens.dimen16,
        right: MyDimens.dimen16,
        bottom: MyDimens.dimen16,
      ),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          IPMTitleText(
            title1: AppLocalizations.products.registration_info_title_1,
            title2: AppLocalizations.products.registration_info_title_2,
          ),
          SizedBox(
            height: 16,
          ),
          Row(
            children: [
              Container(
                width: MyDimens.dimen120,
                child: Text(
                  this.lang == 'th' ||
                          this.lang == "" ||
                          this.dipRegisInfoModel.result!.type == "A0019" ||
                          this.dipRegisInfoModel.result!.type == "A0005" ||
                          this.dipRegisInfoModel.result!.type == "A0007"
                      ? 'เลขที่คำขอ'
                      : this.dipRegisInfoModel.result!.type == "A0007"
                          ? 'เลขทะเบียน'
                          : 'เลขที่คำขอ อสช. (สำหรับรับรองผู้ประกอบการ)',
                  style: TextStyle(
                    fontFamily: 'Prompt-Regular',
                    fontSize: MyDimens.dimen14,
                    fontWeight: FontWeight.w600,
                    letterSpacing: 0.7,
                    color: const Color(0xFF121212),
                  ),
                  maxLines: 5,
                ),
              ),
              SizedBox(
                width: 16,
              ),
              Container(
                width: MyDimens.dimen168,
                child: Text(
                    this
                                    .dipRegisInfoModel
                                    .result!
                                    .dipRegisInfo!
                                    .requestNumber ==
                                null ||
                            this
                                    .dipRegisInfoModel
                                    .result!
                                    .dipRegisInfo!
                                    .requestNumber
                                    .toString() ==
                                "null"
                        ? "-"
                        : '${this.dipRegisInfoModel.result!.dipRegisInfo!.requestNumber.toString()}',
                    style: TextStyle(
                      fontFamily: 'Prompt-Regular',
                      fontSize: MyDimens.dimen14,
                      fontWeight: FontWeight.w500,
                      letterSpacing: 0.7,
                      color: const Color(0xFF121212),
                    ),
                    maxLines: 2),
              ),

              // Divider(),
            ],
          ),
          Container(
            child: Divider(),
            margin: EdgeInsets.only(top: MyDimens.dimen8),
          ),
          // Divider(),
          SizedBox(
            height: 8,
          ),
          this.dipRegisInfoModel.result!.type == "A0001" ||
                  this.dipRegisInfoModel.result!.type == "A0003"
              ? Container()
              : Row(
                  children: [
                    Container(
                      width: MyDimens.dimen120,
                      child: Text(
                        this.lang == 'th' ||
                                this.lang == "" ||
                                this.dipRegisInfoModel.result!.type ==
                                    "A0019" ||
                                this.dipRegisInfoModel.result!.type == "A0005"
                            ? 'เลขที่สิทธิบัตร'
                            : this.dipRegisInfoModel.result!.type == "A0006"
                                ? "เลขที่อนุสิทธิบัตร"
                                : this.dipRegisInfoModel.result!.type == "A0007"
                                    ? "ทะเบียนเลขที่"
                                    : "",
                        style: TextStyle(
                          fontFamily: 'Prompt-Regular',
                          fontSize: MyDimens.dimen14,
                          fontWeight: FontWeight.w600,
                          letterSpacing: 0.7,
                          color: const Color(0xFF121212),
                        ),
                        maxLines: 5,
                      ),
                    ),
                    SizedBox(
                      width: 16,
                    ),
                    Container(
                      width: MyDimens.dimen168,
                      child: Text(
                          this
                                          .dipRegisInfoModel
                                          .result!
                                          .dipRegisInfo!
                                          .certificateNumber ==
                                      null ||
                                  this
                                          .dipRegisInfoModel
                                          .result!
                                          .dipRegisInfo!
                                          .certificateNumber ==
                                      "null"
                              ? "-"
                              : '${this.dipRegisInfoModel.result!.dipRegisInfo!.certificateNumber.toString()}',
                          style: TextStyle(
                            fontFamily: 'Prompt-Regular',
                            fontSize: MyDimens.dimen14,
                            fontWeight: FontWeight.w500,
                            letterSpacing: 0.7,
                            color: const Color(0xFF121212),
                          ),
                          maxLines: 2),
                    ),
                  ],
                ),
          // SizedBox(
          //   height: 8,
          // ),
          this.dipRegisInfoModel.result!.type == "A0001" ||
                  this.dipRegisInfoModel.result!.type == "A0003"
              ? Container()
              : Container(
                  child: Divider(),
                  margin: EdgeInsets.only(top: MyDimens.dimen8),
                ),
          SizedBox(
            height: 8,
          ),
          this.dipRegisInfoModel.result!.type == "A0003"
              ? Container()
              : Row(
                  children: [
                    Container(
                      width: MyDimens.dimen120,
                      child: Text(
                        this.lang == 'th' ||
                                this.lang == "" ||
                                this.dipRegisInfoModel.result!.type ==
                                    "A0019" ||
                                this.dipRegisInfoModel.result!.type ==
                                    "A0005" ||
                                this.dipRegisInfoModel.result!.type ==
                                    "A0006" ||
                                this.dipRegisInfoModel.result!.type == "A0007"
                            ? 'วันที่ยื่นคำขอ'
                            : "",
                        style: TextStyle(
                          fontFamily: 'Prompt-Regular',
                          fontSize: MyDimens.dimen14,
                          fontWeight: FontWeight.w600,
                          letterSpacing: 0.7,
                          color: const Color(0xFF121212),
                        ),
                        maxLines: 5,
                      ),
                    ),
                    SizedBox(
                      width: 16,
                    ),
                    Container(
                      width: MyDimens.dimen168,
                      child: Text(
                          this
                                          .dipRegisInfoModel
                                          .result!
                                          .dipRegisInfo!
                                          .requestDate ==
                                      null ||
                                  this
                                          .dipRegisInfoModel
                                          .result!
                                          .dipRegisInfo!
                                          .requestDate
                                          .toString() ==
                                      "null"
                              ? "-"
                              : '${this.dipRegisInfoModel.result!.dipRegisInfo!.requestDate.toString()}',
                          style: TextStyle(
                            fontFamily: 'Prompt-Regular',
                            fontSize: MyDimens.dimen14,
                            fontWeight: FontWeight.w500,
                            letterSpacing: 0.7,
                            color: const Color(0xFF121212),
                          ),
                          maxLines: 2),
                    ),
                  ],
                ),
          this.dipRegisInfoModel.result!.type != "A0003"
              ? Container(
                  child: Divider(),
                  margin: EdgeInsets.only(top: MyDimens.dimen8),
                )
              : Container(),
          SizedBox(
            height: 8,
          ),
          this.dipRegisInfoModel.result!.type == "A0003" ||
                  this.dipRegisInfoModel.result!.type == "A0001"
              ? Container()
              : Row(
                  children: [
                    Container(
                      width: MyDimens.dimen120,
                      child: Text(
                        this.lang == 'th' ||
                                this.lang == "" ||
                                this.dipRegisInfoModel.result!.type ==
                                    "A0019" ||
                                this.dipRegisInfoModel.result!.type ==
                                    "A0005" ||
                                this.dipRegisInfoModel.result!.type ==
                                    "A0006" ||
                                this.dipRegisInfoModel.result!.type == "A0007"
                            ? 'วันสิ้นอายุ'
                            : "",
                        // this.lang == 'th' || this.lang == ""
                        //     ? AppLocalizations.products.expire_date
                        //     : AppLocalizations.products.expire_date_en,
                        style: TextStyle(
                          fontFamily: 'Prompt-Regular',
                          fontSize: MyDimens.dimen14,
                          fontWeight: FontWeight.w600,
                          letterSpacing: 0.7,
                          color: const Color(0xFF121212),
                        ),
                        maxLines: 5,
                      ),
                    ),
                    SizedBox(
                      width: 16,
                    ),
                    Container(
                      width: MyDimens.dimen168,
                      child: Text(
                          this
                                          .dipRegisInfoModel
                                          .result!
                                          .dipRegisInfo!
                                          .expireDate ==
                                      null ||
                                  this
                                          .dipRegisInfoModel
                                          .result!
                                          .dipRegisInfo!
                                          .expireDate ==
                                      "null"
                              ? "-"
                              : '${this.dipRegisInfoModel.result!.dipRegisInfo!.expireDate.toString()}',
                          style: TextStyle(
                            fontFamily: 'Prompt-Regular',
                            fontSize: MyDimens.dimen14,
                            fontWeight: FontWeight.w500,
                            letterSpacing: 0.7,
                            color: const Color(0xFF121212),
                          ),
                          maxLines: 2),
                    ),
                  ],
                ),
          this.dipRegisInfoModel.result!.type != "A0003"
              ? Container(
                  child: Divider(),
                  margin: EdgeInsets.only(top: MyDimens.dimen8),
                )
              : Container(),
          SizedBox(
            height: 8,
          ),
          this.dipRegisInfoModel.result!.type == "A0003"
              ? Container()
              : Row(
                  children: [
                    Container(
                      width: MyDimens.dimen120,
                      child: this.dipRegisInfoModel.result!.type == "A0001"
                          ? Text(
                              this.lang == 'th' || this.lang == ""
                                  ? "ชื่อผลงาน"
                                  : "ชื่อผลงาน",
                              style: TextStyle(
                                fontFamily: 'Prompt-Regular',
                                fontSize: MyDimens.dimen14,
                                fontWeight: FontWeight.w600,
                                letterSpacing: 0.7,
                                color: const Color(0xFF121212),
                              ),
                              maxLines: 5,
                            )
                          : this.dipRegisInfoModel.result!.type == "A0007"
                              ? Text(
                                  this.lang == 'th' || this.lang == ""
                                      ? "ชื่อเครื่องหมาย"
                                      : "ชื่อเครื่องหมาย",
                                  style: TextStyle(
                                    fontFamily: 'Prompt-Regular',
                                    fontSize: MyDimens.dimen14,
                                    fontWeight: FontWeight.w600,
                                    letterSpacing: 0.7,
                                    color: const Color(0xFF121212),
                                  ),
                                  maxLines: 5,
                                )
                              : this.dipRegisInfoModel.result!.type == "A0005"
                                  ? Text(
                                      this.lang == 'th' || this.lang == ""
                                          ? "ชื่อการประดิษฐ์/การออกแบบผลิตภัณฑ์"
                                          : "ชื่อการประดิษฐ์/การออกแบบผลิตภัณฑ์",
                                      style: TextStyle(
                                        fontFamily: 'Prompt-Regular',
                                        fontSize: MyDimens.dimen14,
                                        fontWeight: FontWeight.w600,
                                        letterSpacing: 0.7,
                                        color: const Color(0xFF121212),
                                      ),
                                      maxLines: 5,
                                    )
                                  : this.dipRegisInfoModel.result!.type ==
                                              "A0019" ||
                                          this.dipRegisInfoModel.result!.type ==
                                              "A0006"
                                      ? Text(
                                          this.lang == 'th' || this.lang == ""
                                              ? 'ชื่อการประดิษฐ์'
                                              : 'ชื่อการประดิษฐ์',
                                          style: TextStyle(
                                            fontFamily: 'Prompt-Regular',
                                            fontSize: MyDimens.dimen14,
                                            fontWeight: FontWeight.w600,
                                            letterSpacing: 0.7,
                                            color: const Color(0xFF121212),
                                          ),
                                          maxLines: 5,
                                        )
                                      : Text(
                                          this.lang == 'th' || this.lang == ""
                                              ? AppLocalizations.products.name
                                              : AppLocalizations
                                                  .products.name_en,
                                          style: TextStyle(
                                            fontFamily: 'Prompt-Regular',
                                            fontSize: MyDimens.dimen14,
                                            fontWeight: FontWeight.w600,
                                            letterSpacing: 0.7,
                                            color: const Color(0xFF121212),
                                          ),
                                          maxLines: 5,
                                        ),
                    ),
                    SizedBox(
                      width: 16,
                    ),
                    Container(
                      width: MyDimens.dimen168,
                      child: Text(
                          this.dipRegisInfoModel.result!.dipRegisInfo!.name ==
                                      null ||
                                  this
                                          .dipRegisInfoModel
                                          .result!
                                          .dipRegisInfo!
                                          .name ==
                                      "null"
                              ? "-"
                              : '${this.dipRegisInfoModel.result!.dipRegisInfo!.name.toString()}',
                          style: TextStyle(
                            fontFamily: 'Prompt-Regular',
                            fontSize: MyDimens.dimen14,
                            fontWeight: FontWeight.w500,
                            letterSpacing: 0.7,
                            color: const Color(0xFF121212),
                          ),
                          maxLines: 5),
                    ),
                  ],
                ),
          this.dipRegisInfoModel.result!.type != "A0003"
              ? Container(
                  child: Divider(),
                  margin: EdgeInsets.only(top: MyDimens.dimen8),
                )
              : Container(),
          SizedBox(
            height: 8,
          ),
          this.dipRegisInfoModel.result!.type == "A0003"
              ? Container()
              : Row(children: [
                  Container(
                    width: MyDimens.dimen120,
                    child: this.dipRegisInfoModel.result!.type == "A0019" ||
                            this.dipRegisInfoModel.result!.type == "A0006" ||
                            this.dipRegisInfoModel.result!.type == "A0005"
                        ? Text(
                            this.lang == 'th' || this.lang == ""
                                ? "ชื่อผู้ขอ (ผู้ขาย)"
                                : "ชื่อผู้ขอ (ผู้ขาย)",
                            style: TextStyle(
                              fontFamily: 'Prompt-Regular',
                              fontSize: MyDimens.dimen14,
                              fontWeight: FontWeight.w600,
                              letterSpacing: 0.7,
                              color: const Color(0xFF121212),
                            ),
                            maxLines: 5,
                          )
                        : this.dipRegisInfoModel.result!.type == "A0007"
                            ? Text(
                                this.lang == 'th' || this.lang == ""
                                    ? 'เจ้าของเครื่องหมาย'
                                    : 'เจ้าของเครื่องหมาย',
                                style: TextStyle(
                                  fontFamily: 'Prompt-Regular',
                                  fontSize: MyDimens.dimen14,
                                  fontWeight: FontWeight.w600,
                                  letterSpacing: 0.7,
                                  color: const Color(0xFF121212),
                                ),
                                maxLines: 5,
                              )
                            : this.dipRegisInfoModel.result!.type == "A0001"
                                ? Text(
                                    this.lang == 'th' || this.lang == ""
                                        ? 'ชื่อเจ้าของ'
                                        : 'ชื่อเจ้าของ',
                                    style: TextStyle(
                                      fontFamily: 'Prompt-Regular',
                                      fontSize: MyDimens.dimen14,
                                      fontWeight: FontWeight.w600,
                                      letterSpacing: 0.7,
                                      color: const Color(0xFF121212),
                                    ),
                                    maxLines: 5,
                                  )
                                : Text(
                                    this.lang == 'th' || this.lang == ""
                                        ? AppLocalizations.products.request_name
                                        : AppLocalizations
                                            .products.request_name_en,
                                    style: TextStyle(
                                      fontFamily: 'Prompt-Regular',
                                      fontSize: MyDimens.dimen14,
                                      fontWeight: FontWeight.w600,
                                      letterSpacing: 0.7,
                                      color: const Color(0xFF121212),
                                    ),
                                    maxLines: 5,
                                  ),
                  ),
                  SizedBox(
                    width: 16,
                  ),
                  Container(
                    width: MyDimens.dimen168,
                    child: Text(
                        this
                                        .dipRegisInfoModel
                                        .result!
                                        .dipRegisInfo!
                                        .requestName ==
                                    null ||
                                this
                                        .dipRegisInfoModel
                                        .result!
                                        .dipRegisInfo!
                                        .requestName
                                        .toString() ==
                                    "null"
                            ? "-"
                            : '${this.dipRegisInfoModel.result!.dipRegisInfo!.requestName.toString()}',
                        style: TextStyle(
                          fontFamily: 'Prompt-Regular',
                          fontSize: MyDimens.dimen14,
                          fontWeight: FontWeight.w500,
                          letterSpacing: 0.7,
                          color: const Color(0xFF121212),
                        ),
                        maxLines: 5),
                  ),
                ]),
          this.dipRegisInfoModel.result!.type != "A0003"
              ? Container(
                  child: Divider(),
                  margin: EdgeInsets.only(top: MyDimens.dimen8),
                )
              : Container(),
          SizedBox(
            height: 8,
          ),
          this.dipRegisInfoModel.result!.type == "A0003"
              ? Container()
              : Row(
                  children: [
                    Container(
                      width: MyDimens.dimen120,
                      // alignment: Alignment.topCenter,
                      child: this.dipRegisInfoModel.result!.type == "A0007"
                          ? Text(
                              this.lang == 'th' || this.lang == ""
                                  ? 'ที่อยู่เจ้าของเครื่องหมาย (ผู้ขาย)'
                                  : 'ที่อยู่เจ้าของเครื่องหมาย (ผู้ขาย)',
                              textAlign: TextAlign.start,
                              style: TextStyle(
                                fontFamily: 'Prompt-Regular',
                                fontSize: MyDimens.dimen14,
                                fontWeight: FontWeight.w600,
                                letterSpacing: 0.7,
                                color: const Color(0xFF121212),
                              ),
                              maxLines: 5,
                            )
                          : this.dipRegisInfoModel.result!.type == "A0006" ||
                                  this.dipRegisInfoModel.result!.type ==
                                      "A0019" ||
                                  this.dipRegisInfoModel.result!.type == "A0005"
                              ? Text(
                                  this.lang == 'th' || this.lang == ""
                                      ? 'ที่อยู่ผู้ขอ (ผู้ขาย)'
                                      : 'ที่อยู่ผู้ขอ (ผู้ขาย)',
                                  textAlign: TextAlign.start,
                                  style: TextStyle(
                                    fontFamily: 'Prompt-Regular',
                                    fontSize: MyDimens.dimen14,
                                    fontWeight: FontWeight.w600,
                                    letterSpacing: 0.7,
                                    color: const Color(0xFF121212),
                                  ),
                                  maxLines: 5,
                                )
                              : Text(
                                  this.lang == 'th' || this.lang == ""
                                      ? 'ที่อยู่ผู้ติดต่อ'
                                      : 'ที่อยู่ผู้ติดต่อ',
                                  textAlign: TextAlign.start,
                                  style: TextStyle(
                                    fontFamily: 'Prompt-Regular',
                                    fontSize: MyDimens.dimen14,
                                    fontWeight: FontWeight.w600,
                                    letterSpacing: 0.7,
                                    color: const Color(0xFF121212),
                                  ),
                                  maxLines: 5,
                                ),
                    ),
                    SizedBox(
                      width: 16,
                    ),
                    Container(
                      width: MyDimens.dimen168,
                      child: Text(
                          this
                                          .dipRegisInfoModel
                                          .result!
                                          .dipRegisInfo!
                                          .addressOfRequestName ==
                                      null ||
                                  this
                                          .dipRegisInfoModel
                                          .result!
                                          .dipRegisInfo!
                                          .addressOfRequestName ==
                                      "null"
                              ? "-"
                              : '${this.dipRegisInfoModel.result!.dipRegisInfo!.addressOfRequestName.toString()}',
                          style: TextStyle(
                            fontFamily: 'Prompt-Regular',
                            fontSize: MyDimens.dimen14,
                            fontWeight: FontWeight.w500,
                            letterSpacing: 0.7,
                            color: const Color(0xFF121212),
                          ),
                          maxLines: 10),
                    ),
                  ],
                ),
          this.dipRegisInfoModel.result!.type != "A0003"
              ? Container(
                  child: Divider(),
                  margin: EdgeInsets.only(top: MyDimens.dimen8),
                )
              : Container(),
          SizedBox(
            height: 8,
          ),
          SizedBox(
            height: 8,
          ),
          this.dipRegisInfoModel.result!.type == "A0007" ||
                  this.dipRegisInfoModel.result!.type == "A0001" ||
                  this.dipRegisInfoModel.result!.type == "A0003"
              ? Container()
              : Row(
                  children: [
                    Container(
                      width: MyDimens.dimen120,
                      child: Text(
                        this.lang == 'th' ||
                                this.lang == "" ||
                                this.dipRegisInfoModel.result!.type == "A0006"
                            ? 'วันที่ออกอนุสิทธิบัตร'
                            : this.dipRegisInfoModel.result!.type == "A0005" ||
                                    this.dipRegisInfoModel.result!.type ==
                                        "A0019"
                                ? 'วันที่ออกสิทธิบัตร'
                                : "",
                        style: TextStyle(
                          fontFamily: 'Prompt-Regular',
                          fontSize: MyDimens.dimen14,
                          fontWeight: FontWeight.w600,
                          letterSpacing: 0.7,
                          color: const Color(0xFF121212),
                        ),
                        maxLines: 5,
                      ),
                    ),
                    SizedBox(
                      width: 16,
                    ),
                    Container(
                      width: MyDimens.dimen168,
                      child: Text(
                          this
                                          .dipRegisInfoModel
                                          .result!
                                          .dipRegisInfo!
                                          .certificateDate ==
                                      null ||
                                  this
                                          .dipRegisInfoModel
                                          .result!
                                          .dipRegisInfo!
                                          .certificateDate ==
                                      "null"
                              ? "-"
                              : '${this.dipRegisInfoModel.result!.dipRegisInfo!.certificateDate.toString()}',
                          style: TextStyle(
                            fontFamily: 'Prompt-Regular',
                            fontSize: MyDimens.dimen14,
                            fontWeight: FontWeight.w500,
                            letterSpacing: 0.7,
                            color: const Color(0xFF121212),
                          ),
                          maxLines: 2),
                    ),
                  ],
                ),
          this.dipRegisInfoModel.result!.type == "A0007" ||
                  this.dipRegisInfoModel.result!.type == "A0001" ||
                  this.dipRegisInfoModel.result!.type == "A0003"
              ? Container()
              : Container(
                  child: Divider(),
                  margin: EdgeInsets.only(top: MyDimens.dimen8),
                ),

          SizedBox(
            height: 8,
          ),
        ],
      ),
    );
  }
}
