added types and states for headerbar and button