pd-view: Use state enums instead of hard-coded values.