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

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

const props = defineProps({
  label: {
    type: String,
    default: '',
  },
  placeholder: {
    type: String,
    default: 'Введите значение'
  },
  type: {
    type: String,
    default: 'text',
  },
  readonly: {
    type: Boolean,
    default: false,
  },
});
const model = defineModel();
</script>

<style scoped>

</style>
