Legal environment of mining design