# Copyright (c) 2015, JINGROW and Contributors
# License: MIT. See LICENSE
import jingrow
from jingrow.model.page import Page


class ClientScript(Page):
	# begin: auto-generated types
	# This code is auto-generated. Do not modify anything in this block.

	from typing import TYPE_CHECKING

	if TYPE_CHECKING:
		from jingrow.types import DF

		dt: DF.Link
		enabled: DF.Check
		module: DF.Link | None
		script: DF.Code | None
		view: DF.Literal["List", "Form"]

	# end: auto-generated types
	def on_update(self):
		jingrow.clear_cache(pagetype=self.dt)

	def on_trash(self):
		jingrow.clear_cache(pagetype=self.dt)
