import{R as ReferenceField}from"./index-6a1cf9c1.js";import{B as BaseField}from"./BaseField-461b6d0c.js";import{S as SingleChoiceField,M as MultipleChoiceField}from"./index-083a6906.js";import{S as SubFormField,a as SectionHeaderField,R as RangeField,N as NumberField}from"./index-fa1db470.js";import{T as TextField}from"./index-403e215e.js";import{D as DateField}from"./date-ce777316.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};