<template>
  <DefaultField :field="field" :errors="errors">
    <template #field>
        <div class="md:flex md:flex-row" v-for="(item, index) in field.value">
            <div class="w-full px-1 md:w-1/2">
                <div class="flex relative w-full">
                    <select class="w-full block form-control form-input form-control-bordered link-default">
                        <option>{{ item.name }}</option>
                    </select>

                    <svg class="flex-shrink-0 pointer-events-none form-select-arrow" xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6">
                        <path class="fill-current" d="M8.292893.292893c.390525-.390524 1.023689-.390524 1.414214 0 .390524.390525.390524 1.023689 0 1.414214l-4 4c-.390525.390524-1.023689.390524-1.414214 0l-4-4c-.390524-.390525-.390524-1.023689 0-1.414214.390525-.390524 1.023689-.390524 1.414214 0L5 3.585786 8.292893.292893z"></path>
                    </svg>
                </div>
            </div>
            <div class="w-full px-1 md:w-1/2">
                <input
                    type="number"
                    v-model="item.value"
                    class="w-full block form-control form-input form-control-bordered"
                    disabled="disabled"
                />
            </div>
        </div>
        <br>
    </template>
  </DefaultField>
</template>

<script>
export default {
  props: ['index', 'resource', 'resourceName', 'resourceId', 'field'],
  data: () => ({
        generator: 0,
    }),
}
</script>
