<commit_before>defmodule PanWeb.Surface.Admin.DateTimeSelect do
  use Surface.Component
  alias Surface.Components.Form
  alias Surface.Components.Form.Input.InputContext
  import Phoenix.HTML.Form

  prop(name, :string, required: true)

  def render_builder(assigns, b) do
    ~H"""
    <div class="ml-3 px-4 py-0 rounded-none">
      📅 {{ b.(:day, [class: "w-16 px-2 py-0 rounded-none"]) }}
          {{ b.(:month, [class: "px-2 py-0 rounded-none"]) }}
          {{ b.(:year, [class: "w-20 px-2 py-0 rounded-none"]) }}
      🕒 {{ b.(:hour, [class: "w-16 px-2 py-0 rounded-none"]) }} :
          {{ b.(:minute, [class: "w-16 px-2 py-0 rounded-none"]) }}
    </div>
    """
  end

  def render(assigns) do
    ~H"""
    <Form.Field name={{ @name |> String.to_atom() }} class="my-2 flex items-center justify-end">
      <Form.Label class="italic"/>
      <InputContext assigns={{ assigns }} :let={{ form: form, field: field }}>
        {{ datetime_select(form, field, builder: fn b -> render_builder(assigns, b) end) }}
      </InputContext>
      <Form.ErrorTag />
    </Form.Field>
    """
  end
end<commit_msg>order functions<commit_after>defmodule PanWeb.Surface.Admin.DateTimeSelect do
  use Surface.Component
  alias Surface.Components.Form
  alias Surface.Components.Form.Input.InputContext
  import Phoenix.HTML.Form

  prop(name, :string, required: true)

  def render(assigns) do
    ~H"""
    <Form.Field name={{ @name |> String.to_atom() }} class="my-2 flex items-center justify-end">
      <Form.Label class="italic"/>
      <InputContext assigns={{ assigns }} :let={{ form: form, field: field }}>
        {{ datetime_select(form, field, builder: fn b -> render_builder(assigns, b) end) }}
      </InputContext>
      <Form.ErrorTag />
    </Form.Field>
    """
  end

  def render_builder(assigns, b) do
    ~H"""
    <div class="ml-3 px-4 py-0 rounded-none">
      📅 {{ b.(:day, [class: "w-16 px-2 py-0 rounded-none"]) }}
          {{ b.(:month, [class: "px-2 py-0 rounded-none"]) }}
          {{ b.(:year, [class: "w-20 px-2 py-0 rounded-none"]) }}
      🕒 {{ b.(:hour, [class: "w-16 px-2 py-0 rounded-none"]) }} :
          {{ b.(:minute, [class: "w-16 px-2 py-0 rounded-none"]) }}
    </div>
    """
  end
end
{'fraction_non_alphanumeric': 0.19047619047619047, 'fraction_numerical': 0.019766397124887692, 'mean_word_length': 2.7745762711864406, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1681750', 'n_tokens_mistral': 800, 'n_tokens_neox': 787, 'n_words': 186}