import 'package:account_center/account_center.dart';
import 'package:flutter/foundation.dart';

import 'enterprise_legal_person_see_state.dart';

class EnterpriseLegalPersonSeeLogic extends GetxController {
  final EnterpriseLegalPersonSeeState state = EnterpriseLegalPersonSeeState();

  @override
  void onInit() {
    super.onInit();
    var data = Get.arguments;
    if (data != null) {
      state.legalName = data['legalName'] ?? '';
      state.legalMobile = data['legalMobile'] ?? '';
      state.legalCardNo = data['legalCardNo'] ?? '';
      state.legalCardFrontImg = data['legalCardFrontImg'] ?? '';
      state.legalCardBackImg = data['legalCardBackImg'] ?? '';
    }
    if (kDebugMode) {
      state.legalCardFrontImg = data['legalCardFrontImg'];
      state.legalCardBackImg = data['legalCardBackImg'];
      // state.legalCardFrontImg = '$devOssDomain${data['legalCardFrontImg']}';
      // state.legalCardBackImg = '$devOssDomain${data['legalCardBackImg']}';
    } else {
      state.legalCardFrontImg = data['legalCardFrontImg'];
      state.legalCardBackImg = data['legalCardBackImg'];
      // state.legalCardFrontImg = '$prodOssDomain${data['legalCardFrontImg']}';
      // state.legalCardBackImg = '$prodOssDomain${data['legalCardBackImg']}';
    }
  }
}
