<template>
  <div v-show="show" class="edit-user-info">
    <div class="edit-user__info">编辑个人信息</div>
    <el-form :model="userInfoData" label-position="top">
      <el-row :gutter="28">
        <el-col :span="12">
          <el-form-item label="姓名">
            <el-input v-model="userInfoData.name" size="large" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="当前求职状态">
            <el-select
              v-model="userInfoData.region"
              size="large"
              placeholder=" "
              style="width: 100%"
            >
              <el-option label="Zone one" value="shanghai" />
              <el-option label="Zone two" value="beijing" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="性别">
            <div class="sex">
              <span :class="radioBtn === '男' ? 'active' : ''" @click="radioBtn = '男'">男</span>
              <span :class="radioBtn === '女' ? 'active' : ''" @click="radioBtn = '女'">女</span>
            </div>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="我的牛人身份">
            <el-select
              v-model="userInfoData.region"
              size="large"
              placeholder=" "
              style="width: 100%"
            >
              <el-option label="Zone one" value="shanghai" />
              <el-option label="Zone two" value="beijing" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="出生年月">
            <el-input v-model="userInfoData.name" size="large" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="电话">
            <el-input v-model="userInfoData.name" size="large" disabled />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="参加工作时间">
            <el-input v-model="userInfoData.name" size="large" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="微信号 (选填)">
            <el-input v-model="userInfoData.name" size="large" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="邮箱 (选填)">
            <el-input v-model="userInfoData.name" size="large" />
          </el-form-item>
        </el-col>
        <el-col :span="12" class="edit-resume-btn">
          <el-button size="large" style="width: 100px" @click="emits('update:show', false)"
            >取消</el-button
          >
          <el-button size="large" type="primary" style="width: 100px">完成</el-button>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<script setup lang="ts">
defineProps({
  show: {
    type: Boolean,
    default: false
  }
})

const emits = defineEmits(['update:show'])

const userInfoData: any = ref({})
const radioBtn = ref('男')
</script>

<style lang="scss" scoped>
.edit-user-info {
  background: #f8f8f8;
  border-radius: 12px;
  padding: 24px;
  font-weight: 400;
  color: #222222;
  .edit-user__info {
    font-size: 18px;
    margin-bottom: 24px;
  }

  .sex {
    display: flex;
    align-items: center;
    span {
      width: 227px;
      height: 38px;
      line-height: 38px;
      text-align: center;
      display: inline-block;
      background: #ffffff;
      border-radius: 8px;
      border: 1px solid #cccccc;
      margin-right: 15px;
      color: #999999;
      cursor: pointer;
    }
    .active {
      background: #dcecff;
      border: 1px solid #177cfa;
      color: #177cfa;
    }
  }

  .edit-resume-btn {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 10px;
  }
}
</style>
