use egui::{Align2, FontId, Response, Sense, vec2};
use super::told;
use crate::ui::theme::{BRAND, GROUND, INK_FAINT, ROW, glyph};
pub const SEND: &str = "send";
pub fn send(ui: &mut egui::Ui, live: bool, help: &str) -> Response {
let (rect, seat) = ui.allocate_exact_size(vec2(ROW, ROW), Sense::click());
super::dress(ui, &seat, rect, SEND);
let seat_ink = if live { BRAND } else { INK_FAINT };
let painter = ui.painter();
painter.circle_filled(rect.center(), ROW / 2.0, seat_ink);
let font = FontId::proportional(ROW * 0.75);
painter.text(
rect.center(),
Align2::CENTER_CENTER,
glyph::PROMPT,
font,
GROUND,
);
told(seat.on_hover_cursor(egui::CursorIcon::PointingHand), help)
}