-module(high_mountains@model_modifier). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]). -define(FILEPATH, "src/high_mountains/model_modifier.gleam"). -export([to_string/1]). -export_type([model_modifier/0]). -if(?OTP_RELEASE >= 27). -define(MODULEDOC(Str), -moduledoc(Str)). -define(DOC(Str), -doc(Str)). -else. -define(MODULEDOC(Str), -compile([])). -define(DOC(Str), -compile([])). -endif. -type model_modifier() :: lazy | number | boolean | {debounce, gleam@option:option(integer())} | {throttle, gleam@option:option(integer())} | fill. -file("src/high_mountains/model_modifier.gleam", 14). ?DOC(false). -spec to_string(model_modifier()) -> binary(). to_string(Mod) -> case Mod of lazy -> <<".lazy"/utf8>>; number -> <<".number"/utf8>>; boolean -> <<".boolean"/utf8>>; {debounce, none} -> <<".debounce"/utf8>>; {throttle, none} -> <<".throttle"/utf8>>; {debounce, {some, Ms}} -> <<<<".debounce."/utf8, (erlang:integer_to_binary(Ms))/binary>>/binary, "ms"/utf8>>; {throttle, {some, Ms@1}} -> <<<<".throttle."/utf8, (erlang:integer_to_binary(Ms@1))/binary>>/binary, "ms"/utf8>>; fill -> <<".fill"/utf8>> end.