package Ġcom . pand ul ape ter . be agle . core . view . gallery Ċ Ċ import Ġandroid . app . Dialog Ċ import Ġandroid . os . Bundle Ċ import Ġandroidx . appcompat . app . AlertDialog Ċ import Ġandroidx . fragment . app . Dialog Fragment Ċ import Ġandroidx . fragment . app . FragmentManager Ċ import Ġcom . pand ul ape ter . be agle . Be agle Core Ċ import Ġcom . pand ul ape ter . be agle . core . util . extension . apply Theme Ċ import Ġcom . pand ul ape ter . be agle . core . util . extension . text Ċ import Ġcom . pand ul ape ter . be agle . core . util . extension . with Arguments Ċ import Ġcom . pand ul ape ter . be agle . utils . Bundle Argument Delegate Ċ Ċ internal Ġclass ĠDelete Confirmation Dialog Fragment Ġ: ĠDialog Fragment () Ġ{ ĊĊĠĠĠ Ġinterface ĠOn Positive Button Clicked Listener Ġ{ ĊĊĠĠĠĠĠĠĠ Ġfun Ġon Positive Button Clicked () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate Dialog ( savedInstanceState : ĠBundle ?): ĠDialog Ġ= Ġrequire Context (). apply Theme (). let Ġ{ Ġcontext Ġ-> ĊĠĠĠĠĠĠĠ ĠAlertDialog . Builder ( context ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. setMessage ( context . text ( if Ġ( arguments ?. is Pl ural Ġ== Ġtrue ) ĠBe agle Core . implementation . appearance . gallery Texts . delete Confirmation Message Pl ural Ġelse ĠBe agle Core . implementation . appearance . gallery Texts . delete Confirmation Message Sing ular )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. set Positive Button ( context . text ( Be agle Core . implementation . appearance . gallery Texts . delete Confirmation Positive )) Ġ{ Ġ_, Ġ_ Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ(( parent Fragment Ġas ? ĠOn Positive Button Clicked Listener ?) Ġ?: Ġ( activity Ġas ? ĠOn Positive Button Clicked Listener ? )) ?. on Positive Button Clicked () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġdismiss () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. set Negative Button ( context . text ( Be agle Core . implementation . appearance . gallery Texts . delete Confirmation Negative )) Ġ{ Ġ_, Ġ_ Ġ-> Ġdismiss () Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. create () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġprivate Ġvar ĠBundle . is Pl ural Ġby ĠBundle Argument Delegate . Boolean (" is Pl ural ") ĊĊĠĠĠĠĠĠĠ Ġfun Ġshow ( fragment Manager : ĠFragment Manager , Ġis Pl ural : ĠBoolean ) Ġ= ĠDelete Confirmation Dialog Fragment (). with Arguments Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . is Pl ural Ġ= Ġis Pl ural ĊĠĠĠĠĠĠĠ Ġ}. run Ġ{ Ġshow ( fragment Manager , Ġtag ) Ġ} ĊĠĠĠ Ġ} Ċ }