<div class="sw-custom-entity-input-field">
    <sw-text-field
        v-if="type === 'string'"
        class="sw-custom-entity-input-field__string"
        :value="currentValue"
        :label="label"
        :placeholder="placeholder"
        :help-text="helpText"
        @update:value="onChange"
    />

    <sw-textarea-field
        v-else-if="type === 'text'"
        class="sw-custom-entity-input-field__text"
        :value="currentValue"
        :label="label"
        :placeholder="placeholder"
        :help-text="helpText"
        @update:value="onChange"
    />

    <sw-number-field
        v-else-if="type === 'int'"
        class="sw-custom-entity-input-field__int"
        :value="currentValue"
        number-type="int"
        :label="label"
        :placeholder="placeholder"
        :help-text="helpText"
        @update:value="onChange"
    />

    <sw-number-field
        v-else-if="type === 'float'"
        class="sw-custom-entity-input-field__float"
        :value="currentValue"
        number-type="float"
        :digits="10"
        :label="label"
        :placeholder="placeholder"
        :help-text="helpText"
        @update:value="onChange"
    />

    <sw-switch-field
        v-else-if="type === 'boolean'"
        class="sw-custom-entity-input-field__boolean"
        :value="currentValue"
        :label="label"
        :placeholder="placeholder"
        :help-text="helpText"
        @update:value="onChange"
    />

    <sw-datepicker
        v-else-if="type === 'date'"
        class="sw-custom-entity-input-field__date"
        hide-hint
        :value="currentValue"
        :label="label"
        :placeholder="placeholder"
        :help-text="helpText"
        @update:value="onChange"
    />

    <!-- ToDo NEXT-22874 - Implement email-field verification to entity_schema
    <sw-email-field
        v-else-if="type === 'email'"
        class="sw-custom-entity-input-field__email"
        :value="currentValue"
        :label="label"
        :placeholder="placeholder"
        :help-text="helpText"
        @change="onChange"
    />-->

    <!-- ToDo NEXT-22874 - Implement json field -->
    <!--<sw-????
        v-else-if="type === 'json'"
        class="sw-custom-entity-input-field__json"
        :value="currentValue"
        :label="label"
        :placeholder="placeholder"
        :help-text="helpText"
        @change="onChange"
    />-->

    <!-- ToDo NEXT-22874 - Implement price-field verification to entity_schema  -->
    <!--<sw-price-field
        v-else-if="type === 'json_object'"
        class="sw-custom-entity-input-field__price"
        :value="currentValue"
        :label="label"
        :placeholder="placeholder"
        :help-text="helpText"
        @change="onChange"
    />-->

    <!-- ToDo NEXT-22874 - Remove after Debug -->
    <sw-text-field
        v-else
        class="sw-custom-entity-input-field__undefined"
        :label="label"
        :error="{ code: 'CONTENT__INVALID_CUSTOM_ENTITY_FIELD_TYPE' }"
        disabled
    />
</div>
