<%= component_wrapper do case @meeting.state when "open" flex_layout(classes: 'op-meeting-sidebar-state') do |open_state| open_state.with_row do render(Primer::Beta::State.new(title: "state", scheme: :open)) do flex_layout do |open_state_label| open_state_label.with_column(mr: 1) do render(Primer::Beta::Octicon.new(icon: "issue-opened")) end open_state_label.with_column do render(Primer::Beta::Text.new) { t("label_meeting_state_open") } end end end end open_state.with_row(mt: 3, display: [:none, nil, :block]) do render(Primer::Beta::Text.new(color: :subtle)) do t("text_meeting_open_description") end end if edit_enabled? open_state.with_row(mt: [0, 3, 3, 3, 3]) do form_for(@meeting, method: "put", url: change_state_meeting_path(@meeting), data: { 'turbo-stream': true }) do |f| flex_layout do |open_state_actions| open_state_actions.with_row do f.hidden_field :state, value: "closed" end open_state_actions.with_row do render(Primer::Beta::Button.new( scheme: :link, color: :default, underline: false, font_weight: :bold, type: :submit )) do |button| button.with_leading_visual_icon(icon: :lock) t("label_meeting_close_action") end end end end end end end when "closed" flex_layout(classes: 'op-meeting-sidebar-state') do |closed_state| closed_state.with_row do render(Primer::Beta::State.new(title: "state", scheme: :default)) do flex_layout do |closed_state_label| closed_state_label.with_column(mr: 1) do render(Primer::Beta::Octicon.new(icon: "issue-closed")) end closed_state_label.with_column do render(Primer::Beta::Text.new) { t("label_meeting_state_closed") } end end end end closed_state.with_row(mt: 3) do render(Primer::Beta::Text.new(color: :subtle, display: [:none, nil, :block])) do t("text_meeting_closed_description") end end if edit_enabled? closed_state.with_row(mt: [0, 3, 3, 3, 3]) do form_for(@meeting, method: "put", url: change_state_meeting_path(@meeting), data: { 'turbo-stream': true }) do |f| flex_layout do |closed_state_actions| closed_state_actions.with_row do f.hidden_field :state, value: "open" end closed_state_actions.with_row do render(Primer::Beta::Button.new( scheme: :link, color: :default, underline: false, font_weight: :bold, type: :submit )) do |button| button.with_leading_visual_icon(icon: :unlock) t("label_meeting_reopen_action") end end end end end end end end end %>