<template>
	<div>
		<el-form-item label-width="0">
			<el-divider class="custom-divider-margin-top">{{ i18nt('designer.setting.optionsSetting') }}</el-divider>
		</el-form-item>
		<dsEnabledEditor :designer="designer" :selected-widget="selectedWidget" :optionModel="optionModel"></dsEnabledEditor>
		<dsNameEditor :designer="designer" :selected-widget="selectedWidget" :optionModel="optionModel" :dataSourceList="designer.formConfig.dataSources"></dsNameEditor>
		<el-form-item label-width="0" v-if="!optionModel.dsEnabled"><option-items-setting :designer="designer" :selected-widget="selectedWidget"></option-items-setting></el-form-item>
	</div>
</template>

<script>
import i18n from '../../../../../components/xform/utils/i18n';
import OptionItemsSetting from '../../../../../components/xform/form-designer/setting-panel/option-items-setting';
import dsEnabledEditor from '../../../../../components/xform/form-designer/setting-panel/property-editor/dsEnabled-editor';
import dsNameEditor from '../../../../../components/xform/form-designer/setting-panel/property-editor/dsName-editor';

export default {
	name: 'optionItems-editor',
	mixins: [i18n],
	props: {
		designer: Object,
		selectedWidget: Object,
		optionModel: Object
	},
	components: {
		OptionItemsSetting,
		dsEnabledEditor,
		dsNameEditor
	},
	created() {
		let that = this;
	}
};
</script>

<style scoped></style>
