<template>
  <div class="input-wrap slt-btn slt-btn-nw">
    <v-select
      v-model="props.params.data.logLevel"
      :items="sltLogLevel"
      variant="outlined"
      class="custom-select"
      style="width:6.25rem; max-width:6.25rem"
    >
    </v-select>
    
    <v-btn class="custom-btn btn-gray" style="max-width:3.5rem; height:1.85rem;" @click="btnClickedHandler">변경</v-btn>
  </div>
  
</template>

<script setup>
  // props
  const props = defineProps({
    params: Object,
  })
  const sltLogLevel = ref([])
  function btnClickedHandler(){
    props.params.clicked(props.params)
  }
  watchEffect(() =>{
    fnGetEnumCode(useLangStore().getLang)
  })
  /**
   * ENUM 업데이트
   * @param lang
   */
  function fnGetEnumCode(lang){
    lang = useUtil.nvl(lang, 'kr')
    let objEnum = useEnumCode.getEnumCode(lang)
    sltLogLevel.value = objEnum.logLevel
  }
</script>