-module(html_dsl@types@input). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). -export([input_type_to_attribute/1]). -export_type([input_type/0]). -type input_type() :: button | checkbox | color | date | datetime_local | email | file | hidden | image | month | number | password | radio | range | reset | search | submit | tel | text | time | url | week. -spec input_type_to_attribute(input_type()) -> binary(). input_type_to_attribute(Input_type) -> <<<<"type=\""/utf8, (case Input_type of button -> <<"button"/utf8>>; checkbox -> <<"checkbox"/utf8>>; color -> <<"color"/utf8>>; date -> <<"date"/utf8>>; datetime_local -> <<"datetime-local"/utf8>>; email -> <<"email"/utf8>>; file -> <<"file"/utf8>>; hidden -> <<"hidden"/utf8>>; image -> <<"image"/utf8>>; month -> <<"month"/utf8>>; number -> <<"number"/utf8>>; password -> <<"password"/utf8>>; radio -> <<"radio"/utf8>>; range -> <<"range"/utf8>>; reset -> <<"reset"/utf8>>; search -> <<"search"/utf8>>; submit -> <<"submit"/utf8>>; tel -> <<"tel"/utf8>>; text -> <<"text"/utf8>>; time -> <<"time"/utf8>>; url -> <<"url"/utf8>>; week -> <<"week"/utf8>> end)/binary>>/binary, "\""/utf8>>.