State of emergency declared for NSW