<template>
	<select class="form-select form-select-sm" style="width: auto;" v-model="x_value">
		<option v-for="item in options" :value="item.ien">{{item.name}}</option>
	</select>
</template>

<script>
	export default {
		props: {
			client: Object,
			modelValue: { default: 2 }
		},
		data() {
			return {
				options: [],
				x_value: this.modelValue
			};
		},
		watch: {
			client: {
				async handler(value) { if(value) this.options = await value.ORWORDG_REVSTS(); },
				immediate: true
			},
			modelValue(value) { this.x_value = value; },
			x_value(value) { this.$emit('update:modelValue', value); }
		}
	};
</script>
