import { defineComponent, ref } from 'vue';
import './index.css';
import icon_like from './icon_like.png';
import icon_liked from './icon_liked.png';

export default defineComponent({
  name: 'the-favorite',
  props: {
    isFavorite: {
      type: Boolean,
      default: false
    }
  },
  setup(props) {
    return () => (
      <div class={['favoriteWrap', props.isFavorite ? 'liked' : '']}>
        <img
          class="favoritIcon"
          src={props.isFavorite ? icon_liked : icon_like}
        />
      </div>
    );
  }
});
