Applied strategy pattern to auto complete search box component