<template>
  <ion-list>
    <ion-radio-group :value="value" v-on:ionChange="$emit('change', $event.detail.value)">

      <ion-list-header v-if="title">{{title}}</ion-list-header>

      <ion-item v-for="option in options" :key="option.value">
        <ion-label>{{option.label}}</ion-label>
        <ion-radio :value="option.value"></ion-radio>
      </ion-item>

    </ion-radio-group>
  </ion-list>
</template>

<script>
export default {
  props: {
    title: { 
    	type: String 
    },
    options: {
    	type: Array
    },
    value: {
    	default: '',
    },
  },
}
</script>