//
// SetupSmartTemplateLayer::onClick from 0xb196e0 to 0xb19820 (320 bytes)
//
// 4 xrefs:
// > ??> @ 0xaa548
// > SetupSmartTemplateLayer::init @ 0xb16f5c
// > SetupSmartTemplateLayer::init @ 0xb17004
// > ??> @ 0x1544cf0
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:01:33 +0000
//
__int64 __fastcall SetupSmartTemplateLayer::onClick(cocos2d::CCObject **this, cocos2d::CCObject *a2)
{
int v3; // w0
__int64 v4; // x20
__int64 v6; // x0
__int64 v7[2]; // [xsp+40h] [xbp+40h] BYREF
void *v8; // [xsp+50h] [xbp+50h]
v3 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2);
if ( v3 )
{
if ( v3 == 5 )
{
v7[0] = 0;
v7[1] = 0;
v8 = nullptr;
std::string::__init(v7, "Are you sure you want to delete this template?", 0x36u);
v4 = FLAlertLayer::create(
(__int64)(this + 83),
(cocos2d::CCLabelBMFont *)"Delete Template",
(char *)v7,
(ButtonSprite *)"NO",
(ButtonSprite *)"YES",
300.0);
if ( (v7[0] & 1) != 0 )
operator delete(v8);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v4 + 72LL))(v4, 5);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v4 + 1312LL))(v4);
}
}
else
{
v6 = BrowseSmartTemplateLayer::create(*(this + 84));
(*(void (__fastcall **)(__int64))(*(_QWORD *)v6 + 1312LL))(v6);
SetupSmartTemplateLayer::onClose((SetupSmartTemplateLayer *)this, nullptr);
}
return _stack_chk_guard;
}