<script setup lang="ts">
import { toRefs } from 'vue'
import {
    LabelControl,
} from './index'
import {
    purifyHtml,
} from '@/helper'

const props = defineProps({
    params: {
        type: Object,
        required: true,
    },
})
const { params } = toRefs(props)

const arg = params.value
</script>

<template>
  <div
    class="stw-row-handle"
    :id="'stw-control-' + arg['id']"
  >
    <div class="stw-left-content">
      <LabelControl :params="arg" />
    </div>
    <div class="stw-right-content">
      <div v-if="arg['description'] !== 'undefined'" v-html="purifyHtml(arg?.['description'] ?? '')" />
    </div>
  </div>
</template>