public function onAfterDuplicateToSubsite($originalPage)
    {
        /** @var ElementalArea $originalElementalArea */
        $originalElementalArea = $originalPage->getComponent('ElementalArea');

        $duplicateElementalArea = $originalElementalArea->duplicate(false);
        $duplicateElementalArea->write();

        $this->owner->ElementalAreaID = $duplicateElementalArea->ID;
        $this->owner->write();

        foreach ($originalElementalArea->Items() as $originalElement) {
            /** @var BaseElement $originalElement */
            $duplicateElement = $originalElement->duplicate(true);

            // manually set the ParentID of each element, so we don't get versioning issues
            DB::query(
                sprintf(
                    "UPDATE %s SET ParentID = %d WHERE ID = %d",
                    DataObject::getSchema()->tableName(BaseElement::class),
                    $duplicateElementalArea->ID,
                    $duplicateElement->ID
                )
            );
        }
    }