; (ii) such units shall remain affordable for at least 30 years; (iii) such property may be a mixed-use property; and (iv) such unit shall be maintained in habitable condition, as defined by the locality in which the property is located. (B) Homeownership units In the case of property assisted pursuant to paragraph (3) consisting of a dwelling unit, or containing any dwelling units, made available for homeownership, such unit or units— (i) shall be available for purchase only by a household having an income that does not exceed 120 percent of the median income for the area in which such unit is located; (ii) if made available through a shared equity homeownership program, shall remain affordable for at least 30 years; and (iii) if not made available through a shared equity homeownership program— (I) shall remain affordable for a period of years as determined by the partnership, which shall not be shorter than 5 years from the sale of the unit; and (II) shall be subject to resale or recapture provisions that— (aa) are established by the partnership to ensure that the affordability term may be met or funds may be redeployed for neighborhood revitalization support activities; (bb) may be waived in cases of hardship or market depreciation