On failure mode transition: a phase field assisted non-equilibrium thermodynamics model for ductile and brittle fracture at finite strain