<template>
  <el-dialog id="custom-dialog" v-model="visible" :close-on-click-modal="false" :title="null" close-icon="null">
    <div class="top-title">物料采集[3]</div>
    <div class="center-content">
      <div>请选择采集的物料类型</div>
    </div>
    <div class="body">
      <div class="box"></div>
    </div>
    <div class="bottom-btns">
      <el-button class="cancelBtn" @click="visible = false">Cancel</el-button>
      <el-button class="sureBtn" type="primary" @click="sure">Confirm
      </el-button>
    </div>
  </el-dialog>
</template>

<script lang="ts" setup>
//物料采集弹窗

const visible = ref(false);

let callBack: Function | null = null;

const showMCDG = (id: string, callback: Function | null) => {
  visible.value = true;
  callBack = callback;
};

const sure = () => {
  callBack && callBack();
  visible.value = false;
};

defineExpose({
  showMCDG,
});
</script>

<style lang="scss">
#custom-dialog {
  background: #f1f3f5;
  box-shadow: 0px 0px 80px 10px rgba(0, 0, 0, 0.25);
  border-radius: 16px 16px 16px 16px;
  width: 924px;
  max-height: 80vh;

  .top-title {
    width: 100%;
    height: 38px;
    font-weight: 500;
    font-size: 38px;
    color: rgba(0, 0, 0, 0.9);
    text-align: center;
  }

  .center-content {
    margin-top: 24px;
    width: 100%;
    //height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: rgba(0, 0, 0, 0.9);
  }

  .body {
    width: calc(100% - 240px);
    max-height: calc(50vh - 80px);
    margin: 0 auto;
    overflow-y: auto;

    .box {
      width: 100%;
      height: 100px;
    }
  }

  .bottom-btns {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 20px;

    .button {
      margin-right: 20px;
    }

    .cancelBtn {
      width: 292px;
      height: 80px;
      background: rgba(0, 0, 0, 0.06);
      border-radius: 76px 76px 76px 76px;
    }

    .sureBtn {
      width: 292px;
      height: 80px;
      background: #0a59f7;
      border-radius: 76px 76px 76px 76px;
    }
  }
}
</style>
