//
// SetupSmartTemplateLayer::onClick from 0x100070e08 to 0x100070ee8 (224 bytes)
//
// 2 xrefs:
// > SetupSmartTemplateLayer::init @ 0x100070bd0
// > SetupSmartTemplateLayer::init @ 0x100070c80
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall SetupSmartTemplateLayer::onClick(SetupSmartTemplateLayer *a1, cocos2d::CCObject *a2)
{
int v3; // w0
BrowseSmartTemplateLayer *v4; // x0
cocos2d::CCObject *v5; // x1
__int64 v6; // x19
void *__p[2]; // [xsp+8h] [xbp-28h] BYREF
char v8; // [xsp+1Fh] [xbp-11h]
v3 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);
if ( v3 == 5 )
{
sub_100009900(__p, "Are you sure you want to delete this template?");
v6 = FLAlertLayer::create_1(&a1->FLAlertLayerProtocol, "Delete Template", __p, "NO", "YES", 300.0);
if ( v8 < 0 )
operator delete(__p[0]);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v6 + 72LL))(v6, 5);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v6 + 1288LL))(v6);
}
else if ( !v3 )
{
v4 = BrowseSmartTemplateLayer::create(a1->m_smartTemplate, (SmartBrowseFilter)0);
((void (__fastcall *)(BrowseSmartTemplateLayer *))v4->show)(v4);
SetupSmartTemplateLayer::onClose(a1, v5);
}
}