defmodule ElixirAiWeb.Voice.Recording do use Phoenix.Component alias Phoenix.LiveView.JS attr :state, :atom, required: true def recording(assigns) do ~H"""
<%= if @state == :idle do %> Voice Input <% end %> <%= if @state == :recording do %> Recording <% end %> <%= if @state == :processing do %> Processing… <% end %>
<%= if @state in [:recording, :processing] do %>
<% end %> <%= if @state == :idle do %> <% end %> <%= if @state == :recording do %> <% end %>
""" end end