# AUTOGENERATED FILE
# generated by datamodel-codegen:
#   timestamp: 2025-10-12 08:23:38.742166


from __future__ import annotations

from typing import Any, List, Literal, Optional, Union

from miniappi.core.app.models import BaseContent
from pydantic import ConfigDict, Field, RootModel


class RecordStringAny(BaseContent):
    pass
    model_config = ConfigDict(
        extra='allow',
    )


Record3Cstring2Cany3E = RecordStringAny


class FormField(BaseContent):
    model_config = ConfigDict(
        extra='allow',
    )
    args: Optional[Record3Cstring2Cany3E] = None
    default: Optional[Any] = None
    label: str
    name: str
    type: Literal['text', 'date', 'datetime', 'boolean', 'integer', 'submit']
    value: Optional[Any] = None


class Submit(BaseContent):
    model_config = ConfigDict(
        extra='allow',
    )
    args: Optional[Record3Cstring2Cany3E] = None
    default: Optional[Any] = None
    label: str
    name: Literal['submit'] = 'submit'
    type: Literal['submit'] = 'submit'
    value: Optional[Any] = None


class Props(BaseContent):
    model_config = ConfigDict(
        extra='allow',
    )
    contentType: Literal['v0/forms/DynamicForm.vue'] = 'v0/forms/DynamicForm.vue'
    fields: List[Union[FormField, Submit]]
    id: str = Field(..., description='ID of the component')


class Root(RootModel[Props]):
    root: Props
