import { YTAvoid, YTHeader } from 'basic';
import { webview } from '@kit.ArkWeb';


@Builder
function PrivacyBuilder() {
  NavDestination() {
    Privacy()
  }.title("隐私政策")
  .hideTitleBar(true)
}

@Component
export struct Privacy {
  @State content: string = '';
  @StorageProp(YTAvoid.SAFE_BOTTOM_KEY) safeBottom: number = 0
  private webviewController: WebviewController = new webview.WebviewController()

  build() {

    Column() {
      YTHeader({ title: "隐私政策" })
      Web({
        src: "https://hm-static.ytpm.net/friend/doc/%E9%9A%90%E7%A7%81%E6%94%BF%E7%AD%96.html",
        controller: this.webviewController,
        renderMode: RenderMode.ASYNC_RENDER // 设置渲染模式
      }).padding(20)
    }
    .width('100%')
    .height('100%')
    .padding({ bottom: this.safeBottom })
  }
}