import { unsupportedControls } from './generated/unsupportedControls'
import type {
  ButtonProps,
  ContextMenuProps,
  ControlGroupProps,
  DisclosureGroupProps,
  DividerProps,
  FormProps,
  FullScreenCoverProps,
  GlassProps,
  GlassEffectContainerProps,
  GeometryReaderProps,
  GroupProps,
  GroupBoxProps,
  ViewThatFitsProps,
  HostProps,
  LabeledContentProps,
  LazyHStackProps,
  LazyVStackProps,
  LazyVGridProps,
  LazyHGridProps,
  GridProps,
  GridRowProps,
  LinkProps,
  ListProps,
  MenuProps,
  NavigationSplitViewColumnProps,
  NavigationSplitViewProps,
  NavigationStackProps,
  OverlayContentProps,
  OverlayProps,
  ViewSlotProps,
  PageProps,
  PagerProps,
  PopoverProps,
  ScrollViewProps,
  ScrollViewReaderProps,
  SectionProps,
  SheetProps,
  SlotProps,
  SpacerProps,
  StackProps,
  SwipeActionsActionsProps,
  SwipeActionsProps,
  TabProps,
  TabSectionProps,
  TabsProps,
  TabViewBottomAccessoryProps,
  TabViewSlotProps,
  ToolbarItemGroupProps,
  ToolbarItemProps,
  ToolbarProps,
  ToolbarContentProps,
  ToolbarSpacerProps,
  ZStackProps,
  SDKAnimation,
  WithAnimationCompletionCriteria,
} from './types'

function Tabs(_props: TabsProps): never {
  throw new Error('Swift.Tabs requires an iOS native build')
}
function Tab(_props: TabProps): never {
  throw new Error('Swift.Tab requires an iOS native build')
}
function TabSection(_props: TabSectionProps): never {
  throw new Error('Swift.TabSection requires an iOS native build')
}
function TabViewBottomAccessory(_props: TabViewBottomAccessoryProps): never {
  throw new Error('Swift.TabViewBottomAccessory requires an iOS native build')
}
function TabViewSlot(_props: TabViewSlotProps): never {
  throw new Error('Swift.TabViewSlot requires an iOS native build')
}
function Menu(_props: MenuProps): never {
  throw new Error('Swift.Menu requires an iOS native build')
}
function ContextMenu(_props: ContextMenuProps): never {
  throw new Error(
    'Swift.ContextMenu requires an iOS native build'
  )
}
function Sheet(_props: SheetProps): never {
  throw new Error('Swift.Sheet requires an iOS native build')
}
function FullScreenCover(_props: FullScreenCoverProps): never {
  throw new Error(
    'Swift.FullScreenCover requires an iOS native build'
  )
}
function Popover(_props: PopoverProps): never {
  throw new Error('Swift.Popover requires an iOS native build')
}
function Host(_props: HostProps): never {
  throw new Error('Swift.Host requires an iOS native build')
}
function HStack(_props: StackProps): never {
  throw new Error('Swift.HStack requires an iOS native build')
}
function VStack(_props: StackProps): never {
  throw new Error('Swift.VStack requires an iOS native build')
}
function ZStack(_props: ZStackProps): never {
  throw new Error('Swift.ZStack requires an iOS native build')
}
function Spacer(_props: SpacerProps): never {
  throw new Error('Swift.Spacer requires an iOS native build')
}
function Form(_props: FormProps): never {
  throw new Error('Swift.Form requires an iOS native build')
}
function Section(_props: SectionProps): never {
  throw new Error('Swift.Section requires an iOS native build')
}
function LabeledContent(_props: LabeledContentProps): never {
  throw new Error(
    'Swift.LabeledContent requires an iOS native build'
  )
}
function GroupBox(_props: GroupBoxProps): never {
  throw new Error('Swift.GroupBox requires an iOS native build')
}
function ViewThatFits(_props: ViewThatFitsProps): never {
  throw new Error('Swift.ViewThatFits requires an iOS native build')
}
function Button(_props: ButtonProps): never {
  throw new Error('Swift.Button requires an iOS native build')
}
function Glass(_props: GlassProps): never {
  throw new Error('Swift.Glass requires an iOS native build')
}
function GlassEffectContainer(_props: GlassEffectContainerProps): never {
  throw new Error('Swift.GlassEffectContainer requires an iOS native build')
}
function GeometryReader(_props: GeometryReaderProps): never {
  throw new Error(
    'Swift.GeometryReader requires an iOS native build'
  )
}
function Slot(_props: SlotProps): never {
  throw new Error('Swift.Slot requires an iOS native build')
}
function List(_props: ListProps): never {
  throw new Error('Swift.List requires an iOS native build')
}
function ScrollViewReader(_props: ScrollViewReaderProps): never {
  throw new Error('Swift.ScrollViewReader requires an iOS native build')
}
function ScrollView(_props: ScrollViewProps): never {
  throw new Error(
    'Swift.ScrollView requires an iOS native build'
  )
}
function LazyVStack(_props: LazyVStackProps): never {
  throw new Error(
    'Swift.LazyVStack requires an iOS native build'
  )
}
function LazyHStack(_props: LazyHStackProps): never {
  throw new Error(
    'Swift.LazyHStack requires an iOS native build'
  )
}
function LazyVGrid(_props: LazyVGridProps): never {
  throw new Error('Swift.LazyVGrid requires an iOS native build')
}
function LazyHGrid(_props: LazyHGridProps): never {
  throw new Error('Swift.LazyHGrid requires an iOS native build')
}
function Grid(_props: GridProps): never {
  throw new Error('Swift.Grid requires an iOS native build')
}
function GridRow(_props: GridRowProps): never {
  throw new Error('Swift.GridRow requires an iOS native build')
}
function ControlGroup(_props: ControlGroupProps): never {
  throw new Error(
    'Swift.ControlGroup requires an iOS native build'
  )
}
function DisclosureGroup(_props: DisclosureGroupProps): never {
  throw new Error(
    'Swift.DisclosureGroup requires an iOS native build'
  )
}
function Divider(_props: DividerProps): never {
  throw new Error('Swift.Divider requires an iOS native build')
}
function Link(_props: LinkProps): never {
  throw new Error('Swift.Link requires an iOS native build')
}
function Group(_props: GroupProps): never {
  throw new Error('Swift.Group requires an iOS native build')
}
function OverlayContent(_props: OverlayContentProps): never {
  throw new Error(
    'Swift.Overlay.Content requires an iOS native build'
  )
}
function OverlayFn(_props: OverlayProps): never {
  throw new Error('Swift.Overlay requires an iOS native build')
}
const Overlay = Object.assign(OverlayFn, { Content: OverlayContent })
function ViewSlotFn(_props: ViewSlotProps): never {
  throw new Error('Swift.ViewSlot requires an iOS native build')
}
const ViewSlot = Object.assign(ViewSlotFn, { Content: OverlayContent })
function SwipeActionsActions(_props: SwipeActionsActionsProps): never {
  throw new Error(
    'Swift.SwipeActions.Actions requires an iOS native build'
  )
}
function SwipeActionsFn(_props: SwipeActionsProps): never {
  throw new Error(
    'Swift.SwipeActions requires an iOS native build'
  )
}
const SwipeActions = Object.assign(SwipeActionsFn, { Actions: SwipeActionsActions })
function Page(_props: PageProps): never {
  throw new Error('Swift.Page requires an iOS native build')
}
function Pager(_props: PagerProps): never {
  throw new Error('Swift.Pager requires an iOS native build')
}
function NavigationStack(_props: NavigationStackProps): never {
  throw new Error(
    'Swift.NavigationStack requires an iOS native build'
  )
}
function NavigationSplitViewFn(_props: NavigationSplitViewProps): never {
  throw new Error('Swift.NavigationSplitView requires an iOS native build')
}
function NavigationSplitViewSidebar(_props: NavigationSplitViewColumnProps): never {
  throw new Error('Swift.NavigationSplitView.Sidebar requires an iOS native build')
}
function NavigationSplitViewContent(_props: NavigationSplitViewColumnProps): never {
  throw new Error('Swift.NavigationSplitView.Content requires an iOS native build')
}
function NavigationSplitViewDetail(_props: NavigationSplitViewColumnProps): never {
  throw new Error('Swift.NavigationSplitView.Detail requires an iOS native build')
}
const NavigationSplitView = Object.assign(NavigationSplitViewFn, {
  Sidebar: NavigationSplitViewSidebar,
  Content: NavigationSplitViewContent,
  Detail: NavigationSplitViewDetail,
})
function ToolbarMarker(_props: ToolbarProps): never {
  throw new Error('Swift.Toolbar requires an iOS native build')
}
function ToolbarContent(_props: ToolbarContentProps): never {
  throw new Error('Swift.Toolbar.Content requires an iOS native build')
}
const Toolbar = Object.assign(ToolbarMarker, { Content: ToolbarContent })
function ToolbarItem(_props: ToolbarItemProps): never {
  throw new Error(
    'Swift.ToolbarItem requires an iOS native build'
  )
}
function ToolbarItemGroup(_props: ToolbarItemGroupProps): never {
  throw new Error(
    'Swift.ToolbarItemGroup requires an iOS native build'
  )
}
function ToolbarSpacer(_props: ToolbarSpacerProps): never {
  throw new Error(
    'Swift.ToolbarSpacer requires an iOS native build'
  )
}
import { ArrangementView } from './ArrangementView'
import type { KeyframeAnimatorProps, KeyframeValue, PhaseAnimatorProps } from './animatorTypes'
import { CubicKeyframe, KeyframeTrack, LinearKeyframe, MoveKeyframe, SpringKeyframe } from './keyframes'
import type { MapWithControlsProps } from './mapControls'
// the map's controls slot is part of its props on every platform; off ios the
// map itself throws, so children never mount there either.
function MapWithControlsStub(_props: MapWithControlsProps): never {
  throw new Error('Swift.Map requires an iOS native build')
}
function PhaseAnimator<Phase>(_props: PhaseAnimatorProps<Phase>): never {
  throw new Error('Swift.PhaseAnimator requires an iOS native build')
}
function KeyframeAnimator<Value extends KeyframeValue>(_props: KeyframeAnimatorProps<Value>): never {
  throw new Error('Swift.KeyframeAnimator requires an iOS native build')
}
export const Swift = {
  ArrangementView,
  Tabs,
  Tab,
  TabSection,
  TabViewBottomAccessory,
  TabViewSlot,
  Menu,
  ContextMenu,
  Sheet,
  FullScreenCover,
  Popover,
  Host,
  HStack,
  VStack,
  ZStack,
  Form,
  Section,
  Glass,
  GlassEffectContainer,
  GeometryReader,
  LabeledContent,
  Button,
  Spacer,
  Slot,
  List,
  ScrollView,
  ScrollViewReader,
  LazyVStack,
  LazyHStack,
  LazyVGrid,
  LazyHGrid,
  Grid,
  GridRow,
  ControlGroup,
  DisclosureGroup,
  Divider,
  Link,
  Group,
  GroupBox,
  ViewThatFits,
  Overlay,
  ViewSlot,
  SwipeActions,
  Pager,
  Page,
  NavigationStack,
  NavigationSplitView,
  Toolbar,
  ToolbarItem,
  ToolbarItemGroup,
  ToolbarSpacer,
  PhaseAnimator,
  KeyframeAnimator,
  KeyframeTrack,
  LinearKeyframe,
  SpringKeyframe,
  CubicKeyframe,
  MoveKeyframe,
  withAnimation(
    _animation: SDKAnimation | null,
    _body: () => void,
    _completion?: () => void,
    _completionCriteria?: WithAnimationCompletionCriteria
  ): never {
    throw new Error('Swift.withAnimation requires an iOS native build')
  },
  ...unsupportedControls,
  Map: MapWithControlsStub,
}
export type * from './types'
