class CKEditor5::Rails::PresetBuilder

def configure(key, value)

def configure(key, value)
  @config[key] = value
end

def initialize

def initialize
  @type = :classic
  @config = {
    plugins: [],
    toolbar: []
  }
end

def language(lang)

def language(lang)
  @config[:language] = lang
end

def menubar(visible: true)

def menubar(visible: true)
  @config[:menuBar] = {
    isVisible: visible
  }
end

def plugin(name, premium: false)

def plugin(name, premium: false)
  @config[:plugins] << Editor::PropsPlugin.new(name, premium: premium)
end

def plugins(*names, premium: false)

def plugins(*names, premium: false)
  names.each { |name| plugin(name, premium: premium) }
end

def shape(type)

def shape(type)
  raise ArgumentError, "Invalid editor type: #{type}" unless Editor::Props.valid_editor_type?(type)
  @type = type
end

def toolbar(*items)

def toolbar(*items)
  @config[:toolbar] = items
end