using Ink_Canvas.Properties;
using System.Windows.Input;

namespace Ink_Canvas.Controls.Toolbar.FloatingToolbar.Items
{
    internal sealed class CursorToolItem : ToolbarImageButtonItemBase
    {
        public override string Id => "builtin.cursor";
        public override string LocalizationKey => "FloatingBar_Mouse";
        public override ToolbarRuleset DefaultHidingRuleset => ToolbarRuleset.AlwaysShow().WithHideOnCollapsed();
        public override string Description => FloatingBarStrings.ToolbarItem_Desc_Cursor;
        public override string IconGeometry => XamlGraphicsIconGeometries.SolidCursorIcon;

        protected override void OnClick(IToolbarHost host, object sender, MouseButtonEventArgs e)
            => host.Window.CursorIcon_Click(sender, e);

        protected override void AfterBuild(IToolbarHost host, ToolbarImageButton view)
            => host.Window.AttachCursorIconView(view);
    }
}
