<template>
  <div>
    <card-title :title="title">
      <template slot="iconsArea">
        <div class="legends float-right">
          <div class="px-1 d-inline-block" v-for="(legend, index) in legends" :key="index">
            <div :class="['bg-' + legend.color, 'circle', 'mx-2', 'align-middle']" />
            <span :class="['text-' + legend.color, 'font-size-5', 'align-middle']">
              {{ legend.title }}
            </span>
          </div>
        </div>
      </template>
    </card-title>
  </div>
</template>
<script>
import CardTitle from '@/app/_global/components/elements/CardTitle'
export default {
  name: 'ChartTitle',
  props: ['title', 'legends'],
  components: { CardTitle },
}
</script>
