import{_ as p}from"./PzIcon-cRuuou9i.js";import{P as c}from"./PzText-D5PUnIjq.js";import{p as d}from"./configs-B15JgQZ-.js";import{p as f,a as m}from"./configs-DshpCAYO.js";import{P as o}from"./PzLink-DjFfrqMo.js";import"./iframe-Bl-fVlm8.js";import"./preload-helper-C1FmrZbK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const u=[{variant:"primary",label:"Primary text link",suffix:"open_in_new"},{variant:"neutral",label:"Neutral navigation link"},{variant:"gray",label:"Gray meta link"},{variant:"button",label:"Button-like action",prefix:"description"},{variant:"icon",label:"Icon-led action",prefix:"launch"}],v=e=>{const t=[`href="${e.href}"`,e.variant!=="primary"?`variant="${e.variant}"`:null,e.target!=="_self"?`target="${e.target}"`:null,e.disabled?':disabled="true"':null,e.inline===!1?':inline="false"':null,e.bold?':bold="true"':null,e.italic?':italic="true"':null,e.lineThrough?':line-through="true"':null].filter(n=>!!n).join(" "),s=[e.showPrefix?`    <template #prefix>
      <PzIcon name="open_in_new" size="16" />
    </template>`:null,`    ${e.label}`,e.showSuffix?`    <template #suffix>
      <PzIcon name="arrow_forward" size="16" />
    </template>`:null].filter(n=>!!n);return`<template>
  <PzLink ${t}>
${s.join(`
`)}
  </PzLink>
</template>`},b={title:"Components/Actions/PzLink",component:o,parameters:{prototype:{caption:"Link component",note:"Figma node access was blocked in this environment, so this single public link primitive is inferred from the shared link, button, and icon tokens plus the legacy link variants you provided."},docs:{description:{component:"Use `PzLink` as the single public link primitive. It stays anchor-based, supports variant-driven visual treatments, and prefers slot composition for prefix or suffix icons instead of router-specific behavior."},source:{transform:(e,t)=>v(t.args??b.args)}}},args:{href:"https://prozorro.gov.ua",variant:"primary",target:"_blank",disabled:!1,inline:!0,bold:!1,italic:!1,lineThrough:!1,typography:void 0,label:"Open procurement details",showPrefix:!0,showSuffix:!0},argTypes:{href:{control:"text",description:"Anchor href value."},variant:{control:"inline-radio",options:m,description:"Visual link treatment."},target:{control:"select",options:f,description:"Anchor target attribute."},disabled:{control:"boolean",description:"Prevents navigation and applies disabled styling."},inline:{control:"boolean",description:"Renders inline-flex or block flex layout."},bold:{control:"boolean",description:"Applies stronger text weight."},italic:{control:"boolean",description:"Applies italic text style."},lineThrough:{control:"boolean",description:"Adds line-through decoration to the content."},typography:{control:"select",options:[void 0,...d],description:"Overrides typography using a PzText variant."},label:{control:"text",description:"Slot content preview text.",table:{category:"Slots"}},showPrefix:{control:"boolean",description:"Shows a prefix icon slot in the preview.",table:{category:"Slots"}},showSuffix:{control:"boolean",description:"Shows a suffix icon slot in the preview.",table:{category:"Slots"}}},render:e=>({components:{pzLink:o,pzIcon:p,pzText:c},setup(){return{args:e,linkReferenceItems:u}},template:`
      <div class="pz-link-story">
        <section class="pz-link-story-board">
          <div class="pz-link-story-header">
            <div>
              <span class="pz-link-story-eyebrow">Component API</span>
              <pz-text variant="h4-bold">One public link primitive</pz-text>
            </div>
            <span class="pz-link-story-chip">{{ args.variant }}</span>
          </div>

          <div class="pz-link-story-preview">
            <pz-link
              :href="args.href"
              :variant="args.variant"
              :target="args.target"
              :disabled="args.disabled"
              :inline="args.inline"
              :bold="args.bold"
              :italic="args.italic"
              :line-through="args.lineThrough"
              :typography="args.typography"
            >
              <template v-if="args.showPrefix" #prefix>
                <pz-icon
                  name="open_in_new"
                  size="16"
                  label="Link prefix icon"
                />
              </template>

              {{ args.label }}

              <template v-if="args.showSuffix" #suffix>
                <pz-icon
                  name="arrow_forward"
                  size="16"
                  label="Link suffix icon"
                />
              </template>
            </pz-link>
          </div>
        </section>

        <section class="pz-link-story-gallery">
          <div class="pz-link-story-header">
            <div>
              <span class="pz-link-story-eyebrow">Variants</span>
              <pz-text variant="h4-bold">Text, button, and icon link treatments</pz-text>
            </div>
          </div>

          <div class="pz-link-story-grid">
            <article
              v-for="item in linkReferenceItems"
              :key="item.variant"
              class="pz-link-story-card"
            >
              <div class="pz-link-story-row">
                <pz-link
                  href="https://prozorro.gov.ua"
                  :variant="item.variant"
                  target="_blank"
                >
                  <template v-if="item.prefix" #prefix>
                    <pz-icon
                      :name="item.prefix"
                      size="16"
                      :label="item.label + ' prefix icon'"
                    />
                  </template>

                  {{ item.label }}

                  <template v-if="item.suffix" #suffix>
                    <pz-icon
                      :name="item.suffix"
                      size="16"
                      :label="item.label + ' suffix icon'"
                    />
                  </template>
                </pz-link>
              </div>
              <p class="pz-link-story-code">
                .pz-link { --pz-link-color; --pz-link-hover-color; --pz-link-border-color; }
              </p>
            </article>
          </div>
        </section>
      </div>
    `})},i={};var r,a,l;i.parameters={...i.parameters,docs:{...(r=i.parameters)==null?void 0:r.docs,source:{originalSource:"{}",...(l=(a=i.parameters)==null?void 0:a.docs)==null?void 0:l.source}}};const _=["Playground"];export{i as Playground,_ as __namedExportsOrder,b as default};
