<template>
  <table style="width: 100%">
    <tr>
      <td
        :style="'text-align:' + widget.style.position"
        v-for="(imageLink, index) in widget.style.imageUrl.split(',')"
        :key="index"
      >
        <a :href="widget.style.linkUrl" :target="widget.style.onClick">
          <img
            alt="Image"
            :src="imageLink"
            :style="{
              width: widget.style.imageSize + '%',
              'max-height': 'inherit',
            }"
          />
        </a>
      </td>
    </tr>
  </table>
</template>

<script>
export default {
  name: "ImageWidget",
  props: {
    widget: Object,
  },
};
</script>
