Component({
  props: {
    componentData: {},
    item: {},
    isChecked: false,
    onCheckBoxClick: () => null,
    itemIndex: 0
  },

  didMount() {
    const {
      carts,
      deliverType = '',
      totalPrice = '',
      disCountTotalPrice = '',
      deliveryCost = 0,
      packingFee = 0
    } = this.props.item;
    const carCheckedList = carts.filter(v => v.checkedState === 'Y' && v.status === 'Y');
    this.setData({
      packingFee,
      deliverType,
      totalPrice,
      disCountTotalPrice,
      deliveryCost,
      carCheckedList
    });
  },

  data: {
    carCheckedList: null,
    deliverType: '',
    totalPrice: '',
    disCountTotalPrice: '',
    deliveryCost: '',
    packingFee: ''
  },
  methods: {
    handleCardClick() {
      const {
        itemIndex,
        isChecked
      } = this.props;
      this.props.onCheckBoxClick && this.props.onCheckBoxClick({
        isChecked: !isChecked,
        itemIndex
      });
    }

  }
});