Unless there is a drop of moisture, then you throw it all away.
You might not want to set foot in your kitchen or bathroom then. Generally speaking cabinets (in the US) use particleboard frames. Higher end stuff will use plywood.I went with IKEA's Sektion cabinets to replace some forty year old particleboard cabinets that warped after years of water damage from a burst pipe. They came with a twenty-five year warranty so there's clearly some expectation of longevity.