; Indentation query for Storybook DSL

; Increase indent after opening braces
[
  "{"
  "("
  "["
] @indent.begin

; Decrease indent before closing braces
[
  "}"
  ")"
  "]"
] @indent.end

; Special handling for prose blocks
(prose_block
  marker: (prose_marker) @indent.begin
  content: (_)
  end: (_) @indent.end
)

; Block structures that should indent their contents
[
  (block)
  (character)
  (template)
  (life_arc)
  (arc_state)
  (schedule)
  (schedule_block)
  (behavior)
  (institution)
  (relationship)
  (location)
  (species)
  (enum_declaration)
  (selector_node)
  (sequence_node)
  (decorator_node)
  (sub_concept)
  (concept_comparison)
  (variant_pattern)
] @indent.begin

; Dedent after semicolon at top level
(use_declaration ";" @indent.end)
(concept_declaration ";" @indent.end)
