<template>
  <SettingsItem :label="label">
    <template #default>
      <Textarea
        v-model="model"
        class="form-control"
        :placeholder="placeholder"
        :readonly="readonly"
        :rows="rows"
      />
    </template>
    <template #help>
      <slot></slot>
    </template>
  </SettingsItem>
</template>

<script setup>
import SettingsItem from "@/components/SettingsItem.vue";
import Textarea from 'primevue/textarea';

const props = defineProps({
  label: {
    type: String,
    default: '',
  },
  placeholder: {
    type: String,
    default: ''
  },
  readonly: {
    type: Boolean,
    default: false,
  },
  rows: {
    type: Number,
    default: 5,
  },
});
const model = defineModel();
</script>
