; (B) an opportunity to be heard on the matter in accordance with this section; and (C) an opportunity to voluntarily surrender any firearm in the possession of the individual. (3) Issuance of extreme risk protection orders (A) Hearing (i) In general Upon receipt of an application described in paragraph (1), or request of an individual named in such application, the court shall order a hearing to be held not later than 30 days after the date of such application or request. (ii) Determination After a hearing described in clause (i), if the court finds by a preponderance of the evidence that the respondent poses a danger of causing harm to himself or herself or to another individual by having access to a firearm, the court may issue an extreme risk protection order. (B) Length of extreme risk protection order An extreme risk protection order shall be in effect until— (i) an order is entered terminating or superseding the extreme risk protection order; or (ii) the date, if any, specified in the extreme risk protection order. (C) Return of firearms After a hearing conducted under this paragraph, if the Court finds that the respondent does not pose a substantial risk of personal injury to himself or herself or to another individual by having access to a firearm, the court shall order that each firearm surrendered, transferred, or removed under paragraph (5) shall be returned to the respondent. (4) Ex parte extreme risk protection orders (A) In general Upon receipt of an application described in paragraph (1), the court may issue an ex parte extreme risk protection order before conducting the hearing required under paragraph (3), if— (i) the application for an extreme risk protection order alleges that the respondent poses a danger of causing harm to himself, herself, or others in the near future by having access to a firearm