-module(tobble@table_render_opts). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). -export([table_width/1, column_width/1, line_type_ascii/0, line_type_box_drawing_characters/0, line_type_rounded_corner_box_drawing_characters/0, line_type_blank/0, title_position_top/0, title_position_bottom/0, hide_title/0, horizontal_rules_only_after_header/0, horizontal_rules_after_every_row/0, no_horizontal_rules/0, apply_options/2]). -export_type([option/0]). -opaque option() :: {option, fun((tobble@internal@render:context()) -> tobble@internal@render:context())}. -file("/home/nick/Documents/code/tobble/src/tobble/table_render_opts.gleam", 17). -spec table_width(integer()) -> option(). table_width(Width) -> {option, fun(Context) -> tobble@internal@render:apply_table_width(Context, Width) end}. -file("/home/nick/Documents/code/tobble/src/tobble/table_render_opts.gleam", 24). -spec column_width(integer()) -> option(). column_width(Width) -> {option, fun(Context) -> tobble@internal@render:apply_column_width(Context, Width) end}. -file("/home/nick/Documents/code/tobble/src/tobble/table_render_opts.gleam", 40). -spec line_type_ascii() -> option(). line_type_ascii() -> {option, fun(Context) -> tobble@internal@render:apply_line_type(Context, ascii_line_type) end}. -file("/home/nick/Documents/code/tobble/src/tobble/table_render_opts.gleam", 55). -spec line_type_box_drawing_characters() -> option(). line_type_box_drawing_characters() -> {option, fun(Context) -> tobble@internal@render:apply_line_type( Context, box_drawing_chars_line_type ) end}. -file("/home/nick/Documents/code/tobble/src/tobble/table_render_opts.gleam", 71). -spec line_type_rounded_corner_box_drawing_characters() -> option(). line_type_rounded_corner_box_drawing_characters() -> {option, fun(Context) -> tobble@internal@render:apply_line_type( Context, box_drawing_chars_with_rounded_corners_line_type ) end}. -file("/home/nick/Documents/code/tobble/src/tobble/table_render_opts.gleam", 92). -spec line_type_blank() -> option(). line_type_blank() -> {option, fun(Context) -> tobble@internal@render:apply_line_type(Context, blank_line_type) end}. -file("/home/nick/Documents/code/tobble/src/tobble/table_render_opts.gleam", 100). -spec title_position_top() -> option(). title_position_top() -> {option, fun(Context) -> tobble@internal@render:apply_title_position( Context, top_title_position ) end}. -file("/home/nick/Documents/code/tobble/src/tobble/table_render_opts.gleam", 107). -spec title_position_bottom() -> option(). title_position_bottom() -> {option, fun(Context) -> tobble@internal@render:apply_title_position( Context, bottom_title_position ) end}. -file("/home/nick/Documents/code/tobble/src/tobble/table_render_opts.gleam", 114). -spec hide_title() -> option(). hide_title() -> {option, fun(Context) -> tobble@internal@render:apply_hide_title(Context) end}. -file("/home/nick/Documents/code/tobble/src/tobble/table_render_opts.gleam", 129). -spec horizontal_rules_only_after_header() -> option(). horizontal_rules_only_after_header() -> {option, fun(Context) -> tobble@internal@render:apply_horizontal_rules( Context, header_only_horizontal_rules ) end}. -file("/home/nick/Documents/code/tobble/src/tobble/table_render_opts.gleam", 148). -spec horizontal_rules_after_every_row() -> option(). horizontal_rules_after_every_row() -> {option, fun(Context) -> tobble@internal@render:apply_horizontal_rules( Context, every_row_has_horizontal_rules ) end}. -file("/home/nick/Documents/code/tobble/src/tobble/table_render_opts.gleam", 164). -spec no_horizontal_rules() -> option(). no_horizontal_rules() -> {option, fun(Context) -> tobble@internal@render:apply_horizontal_rules( Context, no_horizontal_rules ) end}. -file("/home/nick/Documents/code/tobble/src/tobble/table_render_opts.gleam", 171). -spec apply_options(tobble@internal@render:context(), list(option())) -> tobble@internal@render:context(). apply_options(Context, Options) -> gleam@list:fold( Options, Context, fun(Context@1, Option) -> (erlang:element(2, Option))(Context@1) end ).