noun
depending on the situation; according to circumstances
Used to express that an action or decision will be made based on how things develop. Often appears in phrases like 模様次第で決める.
明日の天気模様次第で、ピクニックに行くかどうか決めよう。
Let's decide whether to go on a picnic depending on tomorrow's weather.
会議の模様次第では、計画を変更するかもしれません。
Depending on how the meeting goes, we may change the plan.
Compound of 模様 (pattern, situation) and 次第 (depending on). The exact historical derivation is straightforward.