<template>
  <div class="flex middle-xs cursor-pointer bottom-padding-large">
    <img
      v-if="image.banner_image_description"
      :src="image[thumbKey] ? image[thumbKey] : noimage"
      alt=""
      :id="image.banner_image_description[1].title"
      ref="imagem"
      width="42"
      height="42"
      @click="() => callFileManager()"
      class="js-filemanager cursor-pointer init-filemanager right-margin-medium"
      :class="{ 'border-error' : error.length }"
      title="Clique para selecionar"
    />
    <input
      class="field-entry hidden"
      type="text"
      ref="inputimage"
      v-model="image.image"
      :id="inputid ? inputid : 'id-default'"
    />
    <span class="text-dark text-medium">Selecionar imagem</span>
    <span class="text-error text-x-small visible-block top-margin-small" v-if="error.length">{{ error[0] }}</span>
  </div>
</template>

<style src="../../identity.css"></style>
<style scoped src="./styles.css" /></style>

<script src="./scripts.js"></script>