import 'package:cs_resources/constants/color_constants.dart';
import 'package:cs_resources/generated/assets.dart';
import 'package:domain/entity/response/job_applied_list_s_g_entity.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:plugin_basic/basic_export.dart';
import 'package:plugin_platform/engine/dialog/dialog_engine.dart';
import 'package:shared/utils/util.dart';
import 'package:widgets/ext/ex_widget.dart';
import 'package:widgets/my_button.dart';
import 'package:widgets/my_load_image.dart';
import 'package:widgets/my_text_view.dart';
import 'package:widgets/shatter/border_select_widget.dart';

/**
 * 已申请的员工列表Item
 */
class DropDownStatus extends StatelessWidget {
  final List<JobAppliedListSGRowsStatusList> list;
  final void Function(JobAppliedListSGRowsStatusList bean)? onSelectedAction;

  DropDownStatus({
    required this.list,
    this.onSelectedAction,
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.symmetric(vertical: 5, horizontal: 12),
      margin: EdgeInsets.only(left: 15, right: 15, top: 5, bottom: 5),
      decoration: BoxDecoration(
        color: Color(0xFF56AAFF), // 设置背景颜色和不透明度
        borderRadius: BorderRadius.circular(5), // 设置圆角
      ),
      child: Column(
        mainAxisSize: MainAxisSize.max,
        crossAxisAlignment: CrossAxisAlignment.start,
        children: list
            .map((e) => MyTextView(
                  e.txt ?? "",
                  fontSize: 14,
                  marginTop: 5,
                  marginBottom: 5,
                  textColor: Colors.white,
                  onClick: () {
                    onSelectedAction?.call(e);
                    DialogEngine.dismiss();
                  },
                  isFontRegular: true,
                ))
            .toList(),
      ),
    );
  }
}
