class Maglev::BlockComponent

def children?

def children?
  children.present?
end

def dom_data

rubocop:disable Rails/OutputSafety
def dom_data
  "data-maglev-block-id=\"#{id}\"".html_safe
end

def dom_id

def dom_id
  "block-#{id}"
end

def initialize(section:, attributes:, definition:)

rubocop:disable Lint/MissingSuper
def initialize(section:, attributes:, definition:)
  @section = section
  @id = attributes[:id]
  @name = attributes[:name]
  @type = attributes[:type]
  @children = children
  @definition = definition
  @settings = settings_proxy(
    build_settings_map(attributes[:settings])
  )
end

def inspect_fields

def inspect_fields
  %w[id site_id section_id name type].map { |field| [field, send(field)] }
end

def section_id

def section_id
  section.id
end

def tag_data

def tag_data
  { maglev_block_id: id }
end