### DO NOT EDIT THIS FILE
### This file is auto-generated by the Dyad command-line compiler.
### If you edit this code it is likely to get overwritten.
### Instead, update the Dyad source code and regenerate this file


using ModelingToolkit

function __build_overrides(@nospecialize(kwargs))
  overrides = Dict{String, Symbolics.SymbolicT}()
  for (k, v) in kwargs
    overrides[string(k)::String] = v
  end
  return overrides
end

function __dyad_sym_union(::Type{T}) where T
  return Union{T, Symbolics.has_symwrapper(T) ? Symbolics.wrapper_type(T) : Symbolics.SymbolicT}
end

function __pop_subcomponent_overrides!(overrides::Dict{String, Symbolics.SymbolicT}, prefix::String)
  full = prefix * "__"
  n = ncodeunits(full)
  sub = Dict{Symbol, Symbolics.SymbolicT}()
  for k in collect(keys(overrides))
    startswith(k, full) || continue
    sub[Symbol(SubString(k, n + 1))] = pop!(overrides, k)
  end
  return sub
end
