use std::{rc::Rc, time::Duration}; use gpui::{ App, Div, ElementId, Entity, InteractiveElement, IntoElement, ParentElement, Pixels, RenderOnce, ScrollHandle, SharedString, StatefulInteractiveElement, Styled, Window, div, point, prelude::*, }; use jiff::{ ToSpan, civil::{Date, DateTime, Time}, }; use super::{ super::{ NumberInput, options::{Run, float, surface}, }, picker::{CALENDAR_ROWS, Dropdown, Face, dropdown, picker_field, popped}, show_date, show_time, zoned_now, }; use crate::{ primitives::IconName, theme::{ActiveTheme, ControlSize, Radius, TextSize}, }; type OnTime = Rc; type OnDateTime = Rc; type OnDuration = Rc; /// Scroll handles of the two columns, and the time they last scrolled to. #[derive(Default)] struct Columns { hours: ScrollHandle, minutes: ScrollHandle, shown: Option