帽子 ぼうしであれば
bōshideareba

Noun
Da Copula

The "-eba" conditional form ("if/when…") of 帽子

1. If it's a hat; When it's a hat

Ba Conditional