; 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_declaration)
  (template_declaration)
  (life_arc_declaration)
  (state_block)
  (schedule_declaration)
  (schedule_block)
  (behavior_declaration)
  (institution_declaration)
  (relationship_declaration)
  (location_declaration)
  (species_declaration)
  (enum_declaration)
  (selector_node)
  (sequence_node)
  (decorator_node)
  (sub_concept)
  (definition)
  (variant_pattern)
] @indent.begin

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