<template>
  <div class="room-visibility-widget">
    <template v-if="restricted">
      <closed-eye-icon class="room-visibility-widget__icon"/>
      <span class="room-visibility-widget__text">Lernende sehen nur die eigenen Beiträge</span>
    </template>
    <template v-else>
      <eye-icon class="room-visibility-widget__icon"/>
      <span class="room-visibility-widget__text">Raumeinträge sind für alle Lernenden sichtbar</span>
    </template>

  </div>
</template>

<script>

  import EyeIcon from '@/components/icons/EyeIcon';
  import ClosedEyeIcon from '@/components/icons/ClosedEyeIcon';

  export default {
    props: {
      restricted: {
        type: Boolean,
        default: false
      }
    },

    components: {
      ClosedEyeIcon,
      EyeIcon
    }
  };
</script>

<style scoped lang="scss">
  @import "~styles/helpers";

  .room-visibility-widget {
    display: flex;
    align-items: center;
    opacity: 0.6;

    &__icon {
      width: 30px;
      fill: $color-charcoal-dark;
      margin-right: 15px;
    }

    & > span {
      @include room-widget-text-style;
    }
  }

</style>
