<template>
	<v-row class="search-box" align="center" no-gutters>
		<v-col v-if="label" :cols="labelCols">
			<label for="" class="search-box-label">
				{{ label }}
			</label>
		</v-col>
		<v-col :cols="label ? textCols : ''">
			<v-radio-group
				v-model="selectedView"
				required:rules="radioRules"
				row
				dense
				:hide-details="true"
			>
				<v-radio
					label="전체"
					value="viewAll"
					:ripple="false"
					:color="isDarkMode ? '#1b74d7' : '#4777d9'"
					on-icon="mdi-record-circle"
				></v-radio>
				<v-radio
					label="차트"
					value="viewChart"
					:ripple="false"
					:color="isDarkMode ? '#1b74d7' : '#4777d9'"
					on-icon="mdi-record-circle"
				></v-radio>
				<v-radio
					label="그리드"
					value="viewGrid"
					:ripple="false"
					:color="isDarkMode ? '#1b74d7' : '#4777d9'"
					on-icon="mdi-record-circle"
				></v-radio>
			</v-radio-group>
			<!-- @change="updateBlocCode($event)" -->
		</v-col>
	</v-row>
</template>

<script>
import { mapState, mapMutations, mapActions } from 'vuex';
import Utility from '~/plugins/utility';

export default {
	props: {
		parentPrgmId: {
			type: String,
			require: true,
		},
		labelCols: {
			type: Number,
			require: false,
			default: 4,
		},
		textCols: {
			type: Number,
			require: false,
			default: 8,
		},
	},
	data() {
		return {
			label: '',
			labelPrepend: true,
			//   selected:"CYC_DAY"
		};
	},
	computed: {
		...mapState({
			searchParam: state => state.pageData,
			isDarkMode: 'isDarkMode',
		}),
		selectedView: {
			get() {
				return this.searchParam[this.parentPrgmId].viewCheck;
			},
			set(value) {
				return this.setPageData({ viewCheck: value });
			},
		},
	},
	watch: {},
	created() {
		// this.setDefaultDate(this.searchParam[this.parentPrgmId].cmCycle);
	},
	async mounted() {},
	methods: {
		...mapMutations({ setPageData: 'setPageData' }),
		...mapActions({}),
	},
};
</script>

<style></style>
