import{R as ReferenceField}from"./reference-field-a5b414d1.js";import{B as BaseField}from"./BaseField-0b01dc2c.js";import"./index-61dcd269.js";import{M as MultipleChoiceField}from"./index-4e451db4.js";import{S as SectionHeaderField,R as RangeField,N as NumberField}from"./index-32d8b974.js";import{S as SingleChoiceField}from"./index-23baeeef.js";import{S as SubFormField}from"./index-09efdc01.js";import{T as TextField}from"./index-150b6a59.js";import{D as DateField}from"./date-1bc489bd.js";function generateFieldModelFromRawData(e){if(!e){return undefined}switch(e.type){case DateField.type:return Object.assign(Object.create(DateField.prototype),e);case MultipleChoiceField.type:return Object.assign(Object.create(MultipleChoiceField.prototype),e);case NumberField.type:return Object.assign(Object.create(NumberField.prototype),e);case RangeField.type:return Object.assign(Object.create(RangeField.prototype),e);case SectionHeaderField.type:return Object.assign(Object.create(SectionHeaderField.prototype),e);case SingleChoiceField.type:return Object.assign(Object.create(SingleChoiceField.prototype),e);case SubFormField.type:return Object.assign(Object.create(SubFormField.prototype),e);case TextField.type:return Object.assign(Object.create(TextField.prototype),e);case ReferenceField.type:return Object.assign(Object.create(ReferenceField.prototype),e);default:return Object.assign(Object.create(BaseField.prototype),e)}}export{generateFieldModelFromRawData as g};