import type { Decorator } from "@storybook/react-vite"
import { StoryNotice } from "@/components/story-page"
// Storybook presentation only. Common notice shown above the page title of every SW Story (SW/* groups only):
// each SW stories file opts in with `decorators: [withSWNotice]`, so other menus never render it.
// Hidden verification / internal Stories are skipped; `parameters.swNotice: false` opts a Story out
// (use it where the page already carries the same notice, so it is never shown twice).
export const SW_NOTICE_TEXT =
"SW UI는 공통 컴포넌트의 기능과 동작을 유지하면서, 제품별 특성에 따라 시각적 스타일을 다르게 적용할 수 있습니다."
const HIDDEN_TAGS = ["verification", "internal"]
export const withSWNotice: Decorator = (Story, context) => {
const hidden = (context.tags ?? []).some(tag => HIDDEN_TAGS.includes(tag))
if (hidden || context.parameters.swNotice === false) return
return (
<>
{SW_NOTICE_TEXT}
>
)
}