package model

import "fmt"

type DoorBell struct {
	active bool
}

func (b *DoorBell) String() string {
	state := "active"
	if !b.active {
		state = "not active"
	}
	return fmt.Sprintf("doorbell is %s", state)
}

func NewDoorBell(active bool) *DoorBell {
	return &DoorBell{active: active}
}

func (b *DoorBell) ToggleState() {
	b.active = !b.active
}
